This project is read-only.
2

Closed

Event total differs from python on tutorial

description

When running the standard tutorial event simulator set up we get 1699 events instead of 1695.The events we generate seem to differ slightly, this may be rounding errors or something more serious.Here are the events that differ :Python C#05/11/2008 16:00 HOT 02/10/2008 16:00 PLD20/01/2009 16:00 V 22/10/2008 16:00 BK20/04/2009 16:00 WMB 05/11/2008 16:00 WFC 01/12/2008 16:00 HAL 14/01/2009 16:00 JWN 20/01/2009 16:00 CMA 10/02/2009 16:00 SPG

file attachments

Closed Jan 13, 2013 at 3:04 AM by dmarsh26
This is now fixed !

See comment in EventProfilerExample
    // Available field names: Open, High, Low, Close, Volume, Adj Close,
    // Note in python QSTK, close -> means Adj Close and actual_close -> Close        
    // Since we only use Yahoo data there is no mapping...
    private const string closefield = "Adj Close";

comments

dmarsh26 wrote Jan 2, 2013 at 10:04 PM

Graph showing event count as 1699.

wrote Jan 6, 2013 at 6:06 PM

wrote Jan 6, 2013 at 10:46 PM

SPX500 EventProfilerExample.xlsx verification done by hand.


It shows that the EventprofilerExample.cs generated 5 events are false.

mashi wrote Jan 8, 2013 at 10:43 PM

I'm not able to open the Excel files. My Excel claims they are corrupt, could someone check if it's a problem on my side?

mashi wrote Jan 8, 2013 at 10:45 PM

The Excel files opened fined on a different PC.

wrote Jan 9, 2013 at 12:59 PM

wrote Jan 9, 2013 at 12:59 PM

wrote Jan 11, 2013 at 11:31 PM

wrote Jan 11, 2013 at 11:34 PM

wrote Jan 11, 2013 at 11:37 PM

QSTK python should be checked for PLD between 30.09.2008 - 09.10.2008


There should be two events generated. (On 02.10.2008 and on 07.10.2008)

dmarsh26 wrote Jan 13, 2013 at 1:39 AM

PLD in Python

2/10/2008 - NO Event

SPYValues[i]<-0.03 = true
mktneutDM[symbol][i] < -0.05 = false

SPYValues[i] = float64: -0.0362790697674
mktneutDM[symbol][i] = float64: -0.0441775760602

7/10/2008 - Event !

SPYValues[i]<-0.03 = true
mktneutDM[symbol][i] < -0.05 = true

SPYValues[i] = float64: -0.0448453608247
mktneutDM[symbol][i] = float64: -0.0714185189924
i = 5


PLD in C#

2/10/2008 - Event !

spyValues[dayOffset] < -0.03 true
mktneutDM[symbol][dayOffset] < -0.05 true **** Difference ****

spyValues[dayOffset] -0.0362743139 float
mktneutDM[symbol][dayOffset] -0.05538851 float **** Difference ****

7/10/2008 - NO Event

spyValues[dayOffset] < -0.03 true
mktneutDM[symbol][dayOffset] < -0.05 false **** Difference ****

spyValues[dayOffset] -0.0447860956 float
mktneutDM[symbol][dayOffset] 0.0 float **** Difference ****
dayOffset 5

It appears we may have issues with mktneutDM calculation ?

wrote Jan 13, 2013 at 3:03 AM

dmarsh26 wrote Jan 13, 2013 at 3:03 AM

Debugging info

wrote Jan 13, 2013 at 3:04 AM

wrote Feb 14, 2013 at 1:46 AM

wrote May 16, 2013 at 4:48 AM