VBA Backtest Dividend Correlation

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #113973 quote
    fizuaal
    Participant
    New

    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,

    test-1.xlsx
    #113985 quote
    Nicolas
    Keymaster
    Master

    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 quote
    fizuaal
    Participant
    New

    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)
  • You must be logged in to reply to this topic.

VBA Backtest Dividend Correlation


General Trading: Market Analysis & Manual Trading

New Reply
Author
author-avatar
fizuaal @fizuaal Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by fizuaal
6 years, 3 months ago.

Topic Details
Forum: General Trading: Market Analysis & Manual Trading
Language: English
Started: 11/30/2019
Status: Active
Attachments: 1 files
Logo Logo
Loading...