Anatomy of a back test using Python

Published:

The initial scenario that comes to mind when envisioning a proper backtest for this follower system would be to 

1. Pick a point in history where the test should start. A follower system should have some data to work with. Perhaps the number of draws in the pick 5, around 5k. There are 16k draws on the evening pick 3, so that seems about right.

2. Run the program with only that history, record the pick.

3. Fetch the next result from the full history file.

4. Compare the pick with that result, if a match record the date and number.

5. Re-run the script, repeat until the history file is fully loaded and there are no more draws to add. 

Assuming the cyclic rate hovers around 1 second, there will be 11,000 ish iterations, so run time can be predicted to be around 3 hours.

I should only need to do this for the pick 3 games, then I can say I gave my all in the due diligence department, plus it will be experience in writing unit tests... a real opportunity to use software engineering best practices!

After that, the back test can be used to check settings at 3 hours a shot. Onward!

Entry #213

Comments

Avatar hypersoniq -
#1
I know this blog does not get many views, but it serves as a great place to record thoughts for future reference! This post, for instance was used to capture the idea for a sequence of steps (algorithm) for backtesting my follower system. As I investigate and code the pieces, I can look back here to see what is next. The result may be way different, but I have this snapshot of what I was thinking at the time... the true magic of the LP blog!
Avatar hypersoniq -
#2
The way these systems miss is also notable.
I ran the system today for the Match 6, not usually a game I even play... my picks were non existent, missed all 6. Match 6 also gives you 2 QP lines.
Line 1 (sys)- 0 matches
Line 2 (qp) - 2 matches
Line 3 (qp) - 5 matches

5 on one line =$1,000
7 on the 3 lines =$25

The system failed, yet still got a winning ticket. Only kicking in now that I was 1 number away from 1.6M...

Had I not made the system I would not have played, so though it did not "work", it was a success.

Post a Comment

Please Log In

To use this feature you must be logged into your Lottery Post account.

Not a member yet?

If you don't yet have a Lottery Post account, it's simple and free to create one! Just tap the Register button and after a quick process you'll be part of our lottery community.

Register