Baruch said:
Hi marmoset,
I don't understand a word. I hope you one day will have the time to explain us stupid people, what all this means. Please tell about the method - the rules and so on.
Hi Baruch,
I've used the salami approach to check if there are levels that are more likely to be hit and give a halfway decent return at an acceptable risk (MaxDrawdown and win/loss ratio) level. If you don't know the salami approach, try stuffing one down your throat
That's right, you'll choke!
So I've cut the problem down in slices (just like you do with a salami) and handled them one by one:
1) I have raw 10sec data in comma separated values (.csv) format, but with some useless data and rates going to 6 decimal places instead of 4. Right: wrote RawStripper to get rid of the useless stuff and format the rates to 4 decimal places.
2) Numbercrunching
2a) Why? Original MonkeyBounce rules were based on observation, not on empirical data. Observation is a good start, but it doesn't cut the (Swiss
) cheese. Time to get serious about MonkeyBounce, eh?!
2b) Why code a numbercruncher when I have Excel? Excel is slow, both in calculation and simulation (and does stuff behind your back like format fields to text, no matter how many times you reformat to Number
)
2c) Wrote NumberCruncher to:
- run through all prices
- indicate how many times a price is hit
- open a virtual position at price x
- run position x against real price data with variable stoploss and limit, same-sized.
- report how many times stopped out and closed out (limit hit) per price level, stoploss and limit (or target) level
- save crunched data for further analysis
Time needed: 1 hour (Excel: 8-24 hours, very erratic)
3) Evaluation: wrote Evaluator, originally to identify the trades that are closed out twice as often as stopped out (win/loss ratio of 2:1), for a minimum of 14pips (10pips plus 4pips spread).
Works both ways, by the way, a long that gets stopped out twice as often as closed out is a viable candidate for a short :cheesy:
4) As I still got too much data, I narrowed it down with Evaluator to a win/loss ratio of 3:1 (3 times as often closed out as opposed to stopped out). Also, I wanted to see where the most likely profitable price levels were (either long or short, see end remark of 3), so I added the parameter of "at least ten times successful, long OR short". That gave me, out of the whole 80-something thousand price data a grand total of 110 trades.
5) Finally Excel: load the Evaluator data (3:1, 14pips, 10x or more homeruns) into Excel.
5a) sort by time to identify long runs (price going up, up, up or down, down, down) and count them as one trade to get neutral (as opposed to biased/skewed) data, avoiding double counts
5b) sort by price level, to see where, on average, the prices that got hit in 5) were located, either long or short.
5c) calculate averages/means for 5b) prices, same for stoploss and limit.
6a) Using 5c) data, I wrote Simulator (a simplified NumberCruncher), in order to simulate having traded all four entry levels:
- plug in entry long price L1, stoploss SL1, target T1
- plug in entry long price L2, stoploss SL2, target T2
- plug in entry short price S1, stoploss SLS1, target TS1
- plug in entry short price S2, stoploss SLS2, target TS2
6b) Using RawStripped data from 1), simulate above to be real entries (automated trading system) executed with very real data, takes 2 minutes (Excel: up to half an hour).
7) Look over results:
or
7a) If
: re-crunch, evaluate, simulate with less stringent parameters.
7b) If
, test with other weeks: should results deteriorate: see 7a)
7c) If not, try something else
8) Extreme testing: do 6) and 7) with extreme weeks: straight up or straight down
8a) If results contradict existing levels, numbercrunch, evaluate, simulate till levels are found that work on extreme weeks
8b) Goto alternate sources to find a way of predicting extreme weeks
Voilà, that's all there is to it
And now I wanna see what Tokyo is up to