All right, now it's time to build the ball in Japan's class on your own, and that could be a great
exercise for you.
And it's best to build the class on the ESMAY test the class, because they are very similar.
So we have the very same methods and we have two critical parameters.
So in the same Maslenitsa, we had some short and long and here we have some and the standard deviations
parameter.
So building the mean reversion back, test the class on the Esmay back test.
The class shouldn't be too complicated as long as you go systematically through the class and make the
necessary changes.
Now, if you want to do this exercise on your own, then you should stop the video now.
All right, let's start and first of all, we have to import here a couple of things.
So Panoz non-pay matplotlib and also product from daughter was and then we have a short, dark string
for the class itself.
So it's a class for the vector aspect testing of pollen's up and, uh, based trading strategies.
And then we have the Dundar init method and we have a couple of parameters here.
So we have four DEC, then Azmeh, then the standard deviation to calculate the distance for the lower
and the upper band, the start date and the end date and also the proportional trading costs.
And, uh, we create a couple of attributes here.
And then it's best to add an appropriate string representation, so, for example, a mean reversion
back Teszler and the Palaniappan strategy can be described by the symbol, the ESMAY and the number
of standard deviations.
And then we import the data, and this is actually exactly the same getData method as in the s.M, a
big test subclass, so we don't need to change here anything and we can find the differences in the
method, prepare data.
So here we at some a lower and upper.
And then we should make sure that we can set new parameters for Esmay and death, so if we change and
update some aid, then we also have to update, um, the color Masoumeh and the lower and upper.
And if you change the number of standard deviations, then we only have to update the columns lower
and upper.
Next, the test, the severity method is to the heart of the class, and first of all, we create the
little helper method distance and then we define the training position step by step.
So this isn't anything new.
And, uh, we calculate the strategy returns for each and every bar.
And we determined the number of traits that we substract the trading costs.
And finally, we determined the cumulative returns for buy and hold and the strategy and then the method
returns, the performance and the underperformance.
Next, there are hardly any changes in the plot, the results method, so we can change the title.
And then finally, we have the optimized Parramatta's method and the hippocampus, they Topal for the
same range and to the standard deviation range, and essentially this is the very same code and in the
same back Teszler class.
So we simply have to replace Atsumi Short by Esmay Range and Esmé Long by the standard deviation range.
So that's actually all we have to do here when we start with the estimated back Teszler class.
Thanks for watching and see you in the next election and sections by.