The 2 period RSI oscillator is a popular indicator of short-term over-bought and over-sold market prices. I was wondering if Synergy could be used to identify models that use a 2 period RSI. By default, the period of an RSI oscillator in Synergy can range from 2 to 50. Assuming the default range is not modified, the particles in the swarm would have to bunch up at the lower end of the range to discover a solution that uses a 2 period RSI.
To find out if Synergy could identify such a model, I restricted the function blocks so that the RSI would be used in conjunction with the ExtremesTrader function block. The ExtremesTrader goes long when the input series crosses below the lower threshold and goes short when it crosses above the upper threshold. The traded security is the SP futures and the model trades on the next open.
When using the default swarm size and number of iterations for the particle swarm optimizer (PSO), no models were found. The default swarm size is 45 and the default number of iterations is 30. However, Synergy was able to build a model when the number of iterations, to run the PSO for, was increased to 50.
Synergy 2.5.4 onward features the option to disable the PSO. When the PSO is disabled random values are assigned to the model parameters. The advantage to a purely random search is that models are produced relatively quickly. The disadvantage is that you do not know if the model parameter values are sitting on a narrow spike within the parameter versus fitness space. Walk-forward simulations can be run for the models in either case.
I thought it would be interesting to do a purely random search for models using any of the oscillators in combination with the ExtremesTrader function block. Four models were produced in the 5 minutes that Synergy was run for. Results were excellent and none of the resulting model signals were highly correlated.
The StochasticOsc function block computes a ‘raw’ stochastic value. No smoothing is applied.
The ProjectionOsc is the original Projection Oscillator developed by Dr Mel Widner.
The ProjectionOsc2 function block is a variation on the original Projection Oscillator that uses 1 input series only.
The RSI function block is equivalent to the original RSI oscillator developed by J. Welles Wilder. The Ensemble Report pictured below provides a quick summary of in-sample versus out-of-sample performance. Keep in mind that 4 models is a very small sample size.
Models produced as a result of a purely random search will need to be carefully analyzed to ensure that they are likely to be robust. If automatic walk-forward testing was not applied then manually running a walk-forward simulation would be one important test for robustness.