0x002D CUDA - Market Simulation Building (The Basics)
CUDA - Market Simulation Building (The Basics)
Now that we have looked at the basic Cuda development cycle starting with a C setup, we will now apply it to something useful - market simulations.
Reviewing the basics. Why did 'Trader Joe' make his trade, he seemed savvy:
- "SMA 7 is under SMA 70 by a large margin.. it is my buy signal."
Or effectively this has stated - 'My style is revert-to-mean trading. The SMA (Simple Moving Average) 7 weighted average is underneath the SMA 70 by a large margin which statistically gives me a high-probability of return.'
If 'Trader Joe' is right it will be renumerated him handsomely. But what are his odds? A recent court disclosure of a brokerage showed the following statistics. 84% of day-traders or active traders were loosing money. Only 3% could make more than $50,000 a year:
John Carter now a very wealthy individual used exhaustive manual-backtesting to determine which 'setup' was useful or not. I would guess 84% of the public is simply not that commited as he was.
But ask some questions about this setup:
- What if SMA 6 is more timely?
- What if SMA 75 gives me a better exit timing?
- What percentage differential between these two lagging indicators is the best 'sweet spot'
- What percentage differential at the sell-side is the other best 'sweet spot'
- What if this algorithim works better on Stock X, than stock Y?
You get the idea. We have a infinite number of potential variables but for our sake we have:
- Short SMA: Variable Range A [SMA 4 - SMA 14]
- Long SMA: Variable Range B [SMA 30 - SMA 200]
- Entry Differential: Variable Range C [0.05 - 0.85]
- Exit Differential: Variable Range D [0.85 - 1.35]
- Each Stock will need to be simulated 221,000 times!
- The stock market has 5000+ indices that we can test against (we are sitting on 1.6 billion quotes atm)
Clearly you can see that even beginning to 'brute-force' this problem without the 1000's of compute cores availed to us on the GPU makes it a almost impossible problem.
It behooves us to do exhaustive back-testing because it shows the result of our decision matrix without exposing real money.