Australian (ASX) Stock Market Forum

Improving mean reversion

Alright a few dumb questions so I can catch up:

1. What's "MR"?
2. What's DD? Drawdown?
3. What language is that sinner?
4. What program do you system guys write this in? MT4? Or something else?

:xyxthumbs
 
Alright a few dumb questions so I can catch up:

1. What's "MR"?
2. What's DD? Drawdown?
3. What language is that sinner?
4. What program do you system guys write this in? MT4? Or something else?

:xyxthumbs

1. mean reversion
2 drawdown
3. im not sure
4. theres a few around, many use amibroker, this i believe is metatrader (i think)
 
Greetings --

The code posted for this system includes:

double calculatePosSize()
{
double x = iWPR(NULL,0,s,1);
double y = 0.1;

if(x >= -100 && x < -90) {
y = 0.5;

-------------------

In my opinion ----

1. Position size is determined by risk, and risk is determined by the set of trades that are used as the best estimate of future performance.

Position size is dynamic and based on performance. I recommend that it not be included in the system code that generates the buy and sell signals. Rather, analyze the "best estimate" set of trades, estimate risk of drawdown, compare the risk of drawdown with the trader's personal risk tolerance, then set position size. If the system performance deteriorates, this method automatically reduces position size.

2. The code snippet goes on to give position size based on the 120 day Williams Percent Rank -- essentially the raw position-in-range for the previous 120 days, normalized into a range of 0 to -100. Even if my first suggestion is ignored, it is beneficial to sort trade performance according to the value of the indicator at the time of the signal and see whether there is such a well defined relationship between indicator and profit.

Best regards,
Howard

Hey Howard,

Thanks for your input. Please understand, this is a bootstrap test, to get discussions around MR going and so people can see what's what. I am not providing this system as anything but an example, your "#1" suggestion is definitely the optimal method for implementing this live, and I do something along those lines.

2. Please don't assume I only tried one set of parameters before posting here. What I've posted are actual perceived improvements, but I did test many parameters and position sizing concepts. In this case I have clarified exactly where the "well defined relationship between indicator and profit" lies.

For ThingyMajiggy:

kid hustlr got it all right, the language is MT4, I generally bootstrap my tests (for FX anyway) in MT4 and then rewrite it to JForex or in python/R and upload it into my virtualised environment so it's up 24/7.
 
kid hustlr got it all right, the language is MT4, I generally bootstrap my tests (for FX anyway) in MT4 and then rewrite it to JForex or in python/R and upload it into my virtualised environment so it's up 24/7.

I see, how would I go about it if I wanted to create something with futures? Platforms/languages etc.?

What's your virtualised environment? Like a virtual machine?

:xyxthumbs
 
I see, how would I go about it if I wanted to create something with futures? Platforms/languages etc.?

What's your virtualised environment? Like a virtual machine?

:xyxthumbs

My suggestion for futs trading is without a doubt NinjaScript, or plug into the API directly.

The virtualised environment is a small cluster of geographically distributed virtual machines.
 
My suggestion for futs trading is without a doubt NinjaScript, or plug into the API directly.

Ninja Script being a net environment is good as far as coding strategies are concerned but Ninja Trader
is hopeless for Auto Trading due to the API/Platform issues.

I'm moving to Multicharts NET this year much better platform IMO.:2twocents
 
Ninja Script being a net environment is good as far as coding strategies are concerned but Ninja Trader
is hopeless for Auto Trading due to the API/Platform issues.

I'm moving to Multicharts NET this year much better platform IMO.:2twocents

But NT is free and MC is $1500?
 
Ninja Script being a net environment is good as far as coding strategies are concerned but Ninja Trader
is hopeless for Auto Trading due to the API/Platform issues.

I'm moving to Multicharts NET this year much better platform IMO.:2twocents

What issues have you specifically had with ninjascript?

My personal preference is always to plug directly into the brokers API endpoint if possible but recognise not everyone is a programmer.
 
But NT is free and MC is $1500?

Not if you want to trade live ( I have a paid version of NT)
I don't want to get into a discussion of what platform is better .....all platforms have their strengths and weaknesses
I use and like Ninja Trader for discretionary trading

What issues have you specifically had with ninjascript?

No issues with NinjaScript in fact their solution for the coding of Time conditions is quite elegant compared to other platforms,but that is the frustration good for coding but hopeless with trade management and execution IMO.
Another big issue for me was that backtesting and Simulation in NT is always calculated on Bar close despite
what you have coded which makes these results next to useless IMO.:eek:

When I ran live strategies with NT I had numerous error messages,platform freezing,order management becoming
corrupted i.e. trades becoming disconnected from the strategies...
Am running live on MT4 now for nearly 12 months no error messages/no trade execution problems at all despite many hundreds of trades.
Please note MT4 has its own drawbacks...............
 

Attachments

  • nt1.PNG
    nt1.PNG
    42 KB · Views: 5
Top