|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Replacing MockCandleIteratorSource and MockCandleSeriesSourceHi, I am trying to run DualMovingAverageSystem.java, but insted of using MockCandleIteratorSource and MockCandleSeriesSource as in its original configuration I want to use CsvCandleIteratorSource and CsvCandleSeriesSource respectively. I want the system to read the file data\qqqq.csv, which I downloaded from yahoo. Does this make sense? Here is what I tried in backtestcontext.xml: (leaving all other beans the same) <bean id="candleIteratorSource" class="org.activequant.data.retrieval.series.CsvCandleIteratorSource"> <property name="fileName" value="data/qqqq.csv" /> <property name="delimiter" value=","/> </bean> <bean id="candleSeriesSource" class="org.activequant.data.retrieval.series.CsvCandleSeriesSource" > <property name="delimiter" value=","/> <property name="dateFormat" value="yyyy-mm-dd"/> </bean> the system finds my data file, however I get the error: 2008-10-12 20:24:09,495 [main] INFO [org.activequant.data.util.MarketDataReplayService$4] - fetching data for: data/qqqq.csv NYSE USD STOCK 1166659200000000000 1166918400000000000 from class org.activequant.data.retrieval.series.CsvCandleIteratorSource java.lang.IllegalArgumentException: wrong number of columns ........... I am obviously missing something. Can someone point me to the right direction? How do I tell the system to use my file instead of mock? Thank you for your help! Michael _______________________________________________ ccapi mailing list ccapi@... http://activestocks.de/cgi-bin/mailman/listinfo/ccapi |
|
|
Re: Replacing MockCandleIteratorSource and MockCandleSeriesSourceMichael,
CsvCandleIteratorSource is designed to work with CSV files created by CsvCandleWriter (in org.actiquant.data.util). Hence the error. You can do one of the following: 1. use YahooCandleSeriesSource as data input (at the expense of going to yahoo.com for every series). 2. massage YahooCandleSeriesSource to make it read data from the CSV in yahoo format. 3. Create a downloader application by combining YahooCandleSeriesSource with CsvCandleWriter to store data in aq format. -Mike On Mon, Oct 13, 2008 at 4:52 PM, Michael <nospam1479-radio@...> wrote:
_______________________________________________ ccapi mailing list ccapi@... http://activestocks.de/cgi-bin/mailman/listinfo/ccapi |
|
|
Re: Replacing MockCandleIteratorSource and MockCandleSeriesSourceHi Mike,
thank you for your replay. I used your proposal 1) as it seemed to be the easiest. Of course it makes sense, that CsvCandleIteratorSource can't deal with any general csv-file. Michael
|
| Free Forum Powered by Nabble | Forum Help |