Looking for an expert Amibroker coder to write an AFL that will do the following:
1) User will input a list of stocks.
2) Program will get the Pearson correlation of those stocks over a lookback period of x days using a moving average.
3) For those pairs with a correlation above x%, backtest a strategy according to this methodology:
a. Enter a LONG trade (buy stock A / Short stock B) if the price ratio (price of A/price of B) drops more than x standard deviations below the mean
b. Enter SHORT trade (short stock A / buy Stock B ) if the ratio exceeds more than x standard deviations above the mean
c. Exit a trade when the pair ratio returns to within y standard deviations from the mean; or exit using a stop loss.
I have been helping out my father in Amibroker so have quite some experience with it. I am a quick learner and will be able to learn anything new, if required.I am dedicated to my work and hence will be able to successfully complete this project