VBA Backtest Dividend Correlation

Forums ProRealTime English forum General trading discussions VBA Backtest Dividend Correlation

Viewing 3 posts - 1 through 3 (of 3 total)
  • #113973

    Hello all, Hope you are well,

    I am a beginner in VBA & in modelling, that’s why I’m asking for your help today.

    I have a data base with 300 stocks annual dividends and monthly stocks prices. I have therefore made a vba graph (sheet “Base 100 Dividendes”) comparing the stock price evolution of a stock (orange curve), with its dividendes evolution (blue curve). The histogram illustrates the dividend progression.

    Problem: I am trying to create a model with a backtest. This model would try to find a correlation between the histogram’s evolution and the stock price evolution. This model can be backtested on the all period or just 1, 2 or 3years. (I don’t much knowledge in maths & stats). I’m trying to say the that the model should kepp or sell the value depending on parameters.

    Example: On the stock 7532 JP Equity, we can see that the stock price is positively correlated to the the histogram evolution.

    I’m open to any solutions even though I’d like to stay on VBA Excel. (My existing Code is in the last sheet becuz I can’t upload an .XLSM file here)

    Thank you very much! have a nice day,

    #113985

    Hi, you should have a look at Spearman rank correlation formula (Wikipedia: https://en.wikipedia.org/wiki/Spearman%27s_rank_correlation_coefficient)

    I believe it is massively documented on the web on the way to implement it into Excel VBA. Good luck 😉

    #114123

    Hi Nicolas,

    Thanks for your help but I know how calculate the correlation, I just don’t know how to implement it on VBA!

Viewing 3 posts - 1 through 3 (of 3 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login