SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Thu Jul 02, 2020 11:50 am

All times are UTC + 3 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Tue Apr 15, 2008 5:37 am 
Offline

Joined: Fri Apr 04, 2008 6:11 am
Posts: 138
I've been noticing the simulator generating erroneous trades when simulating large spans of time. See the attached screen shot of a 20-year CSCO simulation for an example.

These trade labels are automatically generated by the simulator and the prices are obviously invalid. There's no way an order can fill at 20.20 when the lowest price for the day is 23.27. I *can* confirm that the orders are generated at the correct time however (ie. the simulator isn't making up trades, it is just filling them at invalid prices).

I've noticed this happening with a couple different stocks. The daily bar data I'm using was downloaded from Yahoo Finance.


Attachments:
bad_trades.png
bad_trades.png [ 27.1 KiB | Viewed 4671 times ]
Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 15, 2008 5:41 am 
Offline

Joined: Fri Apr 04, 2008 6:11 am
Posts: 138
It wouldn't be a big deal if it was just a charting error, but the simulator actually does think these orders are being filled at these invalid prices so it grossly throws off the simulator calculations.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 15, 2008 10:24 am 
Offline

Joined: Wed Oct 08, 2003 1:06 pm
Posts: 833
Hi,

Could please post here a list of Data Requests you use in your strategy (including "Is Build from Trades" option)?

Which version of OQ do you use?

Regards,
Sergey.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 15, 2008 10:30 am 
Offline

Joined: Fri Apr 04, 2008 6:11 am
Posts: 138
I'm on version 2.1.3.

I don't make any data requests within the strategy. I downloaded the daily data from Yahoo Finance through OQ and I use that daily data within the strategy.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 15, 2008 11:43 am 
Offline

Joined: Wed Oct 08, 2003 1:06 pm
Posts: 833
Hi,

Could you try to remove all the data except daily of your instrument from the database and try to run the strategy again. Does it give the same results?

P.S. you can backup and restore your database using the "Database Manager" tool shipped with OQ.

Regards,
Sergey.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 15, 2008 7:14 pm 
Offline

Joined: Fri Apr 04, 2008 6:11 am
Posts: 138
Thanks Sergey. Looking back at the data available for CSCO I see that OQ ships with some default Quote and Trade data. Deleting those data series fixed the problem.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 16, 2008 12:57 pm 
Offline

Joined: Fri May 06, 2005 1:40 am
Posts: 521
Just a quick note in case it proves useful: Yahoo and other free EOD providers usually deliver data dividend adjusted - or unadjusted for splits. In most cases you do not want to test realtime strategies using dividend adjusted timeseries - if your data is not adjusted for dvdnds then it will show accurate price levels of where real trades actually occurred - better for support/resistance/trend lines and other types of indicators.
The theory is that people holding stocks for real time trading only factor in the prices they actually paid for the stock, not the dividends they may have received along the way - you can see that this theory is fairly close to reality when comparing adjusted vs unadjusted series as prices approach "Round Numbers".
Dividend adjusting is most useful if you want to calculate an overall all-encompassing long term timeframe return - but for many technical indicators it just muddies the water.
(Unfortunately I have yet to see a free provider that does not force it on you or provide a way to separate it from split adjusting?).


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 16, 2008 2:38 pm 
Offline

Joined: Thu Mar 20, 2008 4:41 pm
Posts: 273
Location: Sweden
krn_2k wrote:
Just a quick note in case it proves useful: Yahoo and other free EOD providers usually deliver data dividend adjusted - or unadjusted for splits. In most cases you do not want to test realtime strategies using dividend adjusted timeseries - if your data is not adjusted for dvdnds then it will show accurate price levels of where real trades actually occurred - better for support/resistance/trend lines and other types of indicators.
The theory is that people holding stocks for real time trading only factor in the prices they actually paid for the stock, not the dividends they may have received along the way - you can see that this theory is fairly close to reality when comparing adjusted vs unadjusted series as prices approach "Round Numbers".
Dividend adjusting is most useful if you want to calculate an overall all-encompassing long term timeframe return - but for many technical indicators it just muddies the water.
(Unfortunately I have yet to see a free provider that does not force it on you or provide a way to separate it from split adjusting?).

That was very interesting and explains a question I've had for a while.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC + 3 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group