# Notes on Portfolio Correlation

Questions about MultiCharts and user contributed studies.
danilo
Posts: 170
Joined: 02 Jan 2007
Location: Italy
Has thanked: 4 times
Been thanked: 9 times

### Notes on Portfolio Correlation

Hi Marina,

I have built a correlated equity curve portfolio simulator, to simulate the equity curve I have used 2 correlated random numbers draw from a standard normal distribution, and then used few portfolio statistics (%WinngTrade, AverageTrade, Profit factor) to build a equity curve (*). As you can see the best metric that describe the portfolio correlation is the correlation on Return(%). The correlation calculated is lower than the one used for generate the random numbers because in a strategy the are other factors that force a correlation (**).

To have some meaning the correlations must be calculated on a lot of samples, so I will suggest to add the weekly correlation and eventually remove the annual one (since will use very few samples).

I would you ask to check also the way that is using MC to calculate the correlation:

1) to be calculated correctly the equity curves must be in SYNC, the correlation must be calculated on the same number of days and the days must be the same ( Date1=14-Nov-08 -> Date2=14-Nov-08 ) the gap must be filled with the previous equity values.

2) The calculation of Return(%) can give wrong correlation results if the equity line is negative, please when perform the calculation make sure to put the Initial Capital equal to Max Drawdown.

Regards,
Danilo

Notes:

(*) The method proposed by J.Ehlers in the book "Cybernetic Analysis for stocks and futures" is wrong if you try to apply it, you don't recover back the AverageTrade amount.

(**) If we apply a strategy on 2 assets and the strategy has the same Profict Factor and %WinningTrade the 2 equity curve will be forced to be quite correlated.
Attachments
EquityCurve_simulator (Corr).zip
Equity Curve Simulator
(70.2 KiB) Downloaded 48 times

Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007
Dear Danilo,
I would you ask to check also the way that is using MC to calculate the correlation:

1) to be calculated correctly the equity curves must be in SYNC, the correlation must be calculated on the same number of days and the days must be the same ( Date1=14-Nov-08 -> Date2=14-Nov-08 ) the gap must be filled with the previous equity values.
In MC, correlation is based on Profit(\$) and not on equity curve. Periods are synchronized. If Profit is not available for a certain period, its value is taken as 0.
2) The calculation of Return(%) can give wrong correlation results if the equity line is negative, please when perform the calculation make sure to put the Initial Capital equal to Max Drawdown.

The DeltaFactor for the correlation is calculated as follows:

DeltaFactor = Profit/ MaxAbsValue;

Where MaxAbsValue is the maximum (abolute) profit over the period.

Correlation is calculated according to the standard correlation formula.

As for the weekly analysis, we will consider its implementation for future. We are also going to keep the annual correlation for now: mathematically, it is enough to have to variables to calculate it.

Regards.

Return to “MultiCharts”
{"ft_lang_label":"__label__en","ft_lang_prob":0.91157264,"math_prob":0.98227584,"size":3490,"snap":"2019-35-2019-39","text_gpt3_token_len":763,"char_repetition_ratio":0.17756741,"word_repetition_ratio":0.5323993,"special_character_ratio":0.22034384,"punctuation_ratio":0.088748015,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99720174,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-08-23T08:43:37Z\",\"WARC-Record-ID\":\"<urn:uuid:e5e86a1f-37c4-4f6a-8bf1-1986891d9167>\",\"Content-Length\":\"36515\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:416784ec-a232-4541-91b4-19bc858522ea>\",\"WARC-Concurrent-To\":\"<urn:uuid:7fa003cd-4b72-47db-8122-f2d2d5e82113>\",\"WARC-IP-Address\":\"209.197.95.132\",\"WARC-Target-URI\":\"https://www.multicharts.com/discussion/viewtopic.php?t=5752\",\"WARC-Payload-Digest\":\"sha1:PWOPK2W4WQVPFLASEQB3YGVTPPFKIBDY\",\"WARC-Block-Digest\":\"sha1:XOZYDKVAUPXNLGQCO3EBWN6SSOQK24EK\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-35/CC-MAIN-2019-35_segments_1566027318243.40_warc_CC-MAIN-20190823083811-20190823105811-00501.warc.gz\"}"}