{"id":16416,"date":"2022-05-30T16:46:51","date_gmt":"2022-05-30T14:46:51","guid":{"rendered":"https:\/\/quantpedia.com\/?p=16416"},"modified":"2025-06-04T13:56:32","modified_gmt":"2025-06-04T11:56:32","slug":"introduction-and-examples-of-monte-carlo-strategy-simulation","status":"publish","type":"post","link":"https:\/\/vvv.quantpedia.com\/es\/introduction-and-examples-of-monte-carlo-strategy-simulation\/","title":{"rendered":"Introduction and Examples of Monte Carlo Strategy Simulation"},"content":{"rendered":"<p class=\"wp-block-paragraph\"><strong>The Monte Carlo method (Monte Carlo simulations) is a class of algorithms that rely on a repeated random sampling to obtain various scenario results. Monte Carlo simulations are used to predict the probability of different outcomes when it would be difficult to use other approaches such as optimization. The main aim is to create alternative scenarios, which account for possible risk and help with decision making. The simulations are used in various fields, from finance and quantitative analysis to engineering or science. We plan to unveil our new \u201cMonte Carlo\u201d report for <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/pricing-pro\/\">Quantpedia Pro<\/a> clients in a next few days, and this article is our introduction to different methodologies that can be used for Monte Carlo calculation.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Monte Carlo Simulations are a useful tool both for risk management and portfolio management. Risk managers may calculate a proper budget for a potential quantitative investment strategy, whereas portfolio managers may set their expectations more precisely and easily perform a sensitivity analysis of their strategies. Monte Carlo simulations are an option to create endless alternative scenarios to test your strategies in. Their main advantage is that they reach beyond historical data and rather alter the history artificially.<\/p>\n\n\n\n<h2><span style=\"font-size: 18pt;\">Underlying Strategy<\/span><\/h2>\n\n\n\n<p>In our analysis, we applied Monte Carlo simulations to a quantitative investment strategy. More specifically we used a trading strategy called a <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/a-new-return-asymmetry-investment-factor-in-commodity-futures\/\">Return Asymmetry Investment factor in commodity futures<\/a>. The strategy is based on the idea that the greater (lower) upside asymmetry is associated with lower (higher) expected returns, analyzed in numerous <a href=\"https:\/\/papers.ssrn.com\/sol3\/papers.cfm?abstract_id=2676633\">theoretical studies<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Quantpedia\u2019s commodity futures strategy aims to examine the return asymmetry in commodity futures in a slightly less traditional way. Instead of using <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/skewness-lottery-effect-in-commodities\/\">skewness<\/a> as a proxy for the return asymmetry, we rely on a new asymmetric measure IE proposed by <a href=\"https:\/\/papers.ssrn.com\/sol3\/papers.cfm?abstract_id=2660598\">Jiang et al.<\/a> (2020), which uses the difference between upside and downside return probabilities to capture the degree of asymmetry.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As for the investment universe, the strategy follows <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/skewness-lottery-effect-in-commodities\/\">Pady\u0161\u00e1k and Vojtko<\/a> (2019). Their dataset of commodities offers broad exposure to the commodity market. The portfolio is constructed on the asymmetric measure as follows. At the beginning of each month, each commodity&#8217;s asymmetry (IE) is calculated using the latest 260 daily returns. Then the commodities are ranked according to their IE. The portfolio goes long on the bottom four commodities with the lowest IE in the previous month and short on the top four commodities with the highest IE in the last month (ties in ranks can change these).<\/p>\n\n\n\n<h2><span style=\"font-size: 18pt;\">Monte Carlo strategy simulation types<\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">There are several types of Monte Carlo applications in quantitative trading strategies. We will focus on different ways of randomization of strategy\u2019s returns. In this article we cover the most practical and most widely used ones:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Monte Carlo sampling without replacement<\/li><li>Monte Carlo sampling with replacement<\/li><li>Monte Carlo return alterations<\/li><li>Comparison against random strategies<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Now, we can (and we do) apply each of these to either:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Period returns of the strategy (e.g. monthly returns) or<\/li><li>Trade returns of the strategy<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">With period returns it\u2019s more of a time series approach, while with trade returns it\u2019s more a classical trading P&amp;L point of view.<\/p>\n\n\n\n<h2><span style=\"font-size: 18pt;\">Analysis<\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">As we already mentioned, we applied Monte Carlo simulations to an already existing strategy. The following figure shows the cumulative performance of the original, unaltered strategy and also its risk and return characteristics.<\/p>\n\n\n\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter wp-image-16417 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/12\/MCS01-cumulative.return.of_.the_.original.strategy.png\" alt=\"MCS01-cumulative.return.of.the.original.strategy\" width=\"752\" height=\"500\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS01-cumulative.return.of_.the_.original.strategy.png 752w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS01-cumulative.return.of_.the_.original.strategy-300x199.png 300w\" sizes=\"(max-width: 752px) 100vw, 752px\" \/><\/p>\n\n\n\n<p><img decoding=\"async\" class=\"aligncenter wp-image-16418 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/12\/MCS02-Table.of_.the_.original.strategy.png\" alt=\"MCS02-Table.of.the.original.strategy\" width=\"750\" height=\"117\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS02-Table.of_.the_.original.strategy.png 750w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS02-Table.of_.the_.original.strategy-300x47.png 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Our analysis consists of three parts, each including multiple approaches to Monte Carlo simulations:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>The first part analyzes the monthly returns of the strategy and applies the first three Monte Carlo methods mentioned above<\/li><li>The second part does the same, but utilizing trade returns<\/li><li>Finally, the third part presents the comparison of the original strategy against random strategies<\/li><\/ul>\n\n\n\n<h2><span style=\"font-size: 18pt;\">Monte Carlo simulations of the Strategy\u2019s Monthly Returns<\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In the first section, we look at the monthly returns of the underlying strategy. First of all, we create a vector of monthly returns. Then we take three approaches to Monte Carlo simulations to create new vectors.<\/p>\n\n\n\n<h3><strong><span style=\"font-size: 14pt;\"><u>Monte Carlo sampling without replacement <\/u><\/span><\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This Monte Carlo method only <strong>changes order of the returns<\/strong>, i.e. \u201creshuffles\u201d returns. The main assumption behind this method is, that returns will stay the same (or similar) but their order of occurrence may change.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Technically we are talking about a simple random sampling without replacement (reshuffling the data).&nbsp; We create 100 new samples of the same length by applying randomization without replacement. So, we basically reshuffle the data 100-times to create 100 new vectors, and we calculate the cumulative returns of the simulated strategies. For better visual clarity, the following figure shows only 50 of the 100 simulations.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When using Monte Carlo random sampling without replacement, the volatility of the simulated strategies will be always the same as that of the original strategy. Also, the cumulative return will be logically very similar, because we only change order of the returns and the only way why return may differ is because of compounding. The most <strong>interesting<\/strong> attribute to observe <strong>in<\/strong> <strong>this Monte Carlo method is drawdown<\/strong>. Drawdown may change (and also does change in our case) significantly when we change the order of the returns.<\/p>\n\n\n\n<p><img decoding=\"async\" class=\"aligncenter wp-image-16419 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/12\/MCS03-cumulative.return.of_.SimA_.png\" alt=\"MCS03-cumulative.return.of.SimA\" width=\"752\" height=\"500\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS03-cumulative.return.of_.SimA_.png 752w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS03-cumulative.return.of_.SimA_-300x199.png 300w\" sizes=\"(max-width: 752px) 100vw, 752px\" \/><\/p>\n\n\n\n<p>The figure above presents various random realizations of return order reshuffling. The figure also shows that the original strategy lies roughly in the middle of the simulated strategies most of the time, exactly as expected. We calculated the 95th, 75th, 50th, 25th, 10th, 5th, 1st, and the 0th percentile of the risk and return characteristic to see exactly how well it performs compared to the simulations.<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-16420 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/12\/MCS04-Table.of_.SimA_.png\" alt=\"MCS04-Table.of.SimA\" width=\"750\" height=\"323\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS04-Table.of_.SimA_.png 750w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS04-Table.of_.SimA_-300x129.png 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Interestingly enough, more than 95% of the random realizations have lower (better) drawdown figure than the original strategy. This suggests, the original\u2019s strategy drawdown may be a bit conservative figure.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Additionally, the next figure presents a set of histograms showing the frequency of individual risk and return characteristics in our 100 simulations. There is only a single value for volatility because we applied the random sampling without replacement.<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-16421 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/12\/MCS05-Hist.of_.SimA_.png\" alt=\"MCS05-Hist.of.SimA\" width=\"752\" height=\"700\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS05-Hist.of_.SimA_.png 752w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS05-Hist.of_.SimA_-300x279.png 300w\" sizes=\"(max-width: 752px) 100vw, 752px\" \/><\/p>\n\n\n\n<h3><strong><span style=\"font-size: 14pt;\"><u>Monte Carlo sampling with replacement <\/u><\/span><\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This Monte Carlo method not only <strong>changes order of the returns, it also randomly skips or repeats returns<\/strong> of the original strategy. The main assumption behind this method is, that a return distribution will stay the same (or similar) but returns may change more significantly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Technically, we are talking about a random sampling with replacement. We create 100 new samples of the same length as the original vector of returns by applying randomization of returns with replacement. Then we calculate the cumulative returns of the simulated strategies. For better clarity, the figure below again shows only 50 of the 100 simulations.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Monte Carlo <strong>sampling with replacement creates much more variety<\/strong> in simulated strategy returns. It\u2019s logical that randomization with replacement may result in repeating multiple unsuccessful months as well as multiple successful ones in a row. With this method we also simulate changes in volatility and in cumulative returns.&nbsp;<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-16422 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/12\/MCS06-cumulative.return.of_.SimB_.png\" alt=\"MCS06-cumulative.return.of.SimB\" width=\"752\" height=\"500\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS06-cumulative.return.of_.SimB_.png 752w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS06-cumulative.return.of_.SimB_-300x199.png 300w\" sizes=\"(max-width: 752px) 100vw, 752px\" \/><\/p>\n\n\n\n<p>Once again, as expected, most of the time the original strategy seems to lie in the middle of the simulated strategies. Again, we calculated the 95th, 75th, 50th, 25th, 10th, 5th, 1st, and the 0th percentile of the risk and return characteristic to see how well the original strategy performed.<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-16423 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/12\/MCS07-Table.of_.SimB_.png\" alt=\"MCS07-Table.of.SimB\" width=\"750\" height=\"323\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS07-Table.of_.SimB_.png 750w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS07-Table.of_.SimB_-300x129.png 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Looking at the cumulative return, volatility, and Sharpe ratio, the original strategy\u2019s performance is between the 25th and the 50th percentile. This indicates, that more than half of the random alterations of the strategy are eventually better than the original strategy. When we look at the maximum drawdown or the 95% drawdown, once again they are better than the original strategy in more than 95% of scenarios. This is definitely encouraging for the original strategy. Moreover, we present a set of histograms showing the frequency of individual risk and return characteristics.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-16424 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/12\/MCS08-Hist.of_.SimB_.png\" alt=\"MCS08-Hist.of.SimB\" width=\"752\" height=\"700\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS08-Hist.of_.SimB_.png 752w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS08-Hist.of_.SimB_-300x279.png 300w\" sizes=\"(max-width: 752px) 100vw, 752px\" \/><\/figure>\n\n\n\n<h3><strong><span style=\"font-size: 14pt;\"><u>Monte Carlo return alterations<\/u><\/span><\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This Monte Carlo method <strong>changes randomly picked returns in random direction<\/strong> by a pre-specified amount. The main assumption behind this method is, that returns may simply become smaller or larger in the future. It\u2019s useful to observe strategy\u2019s sensitivity to such a scenario.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Technically, we <strong>change X% of the data by Y%<\/strong>. So, in the first step, we randomly choose X% of the returns, and then we randomly either add Y% to or subtract Y% from the chosen monthly return in the second step.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, if the monthly returns were (0.5%, 1%, -2.5%, -3%, 0.5%, 1.5%), X = 0.5 (50%) and Y = 0.02 (2%). One of the simulations could be (2.5%, -1%, -2.5%, -5%, 0.5%, 1.5%). The process is repeated 100-times with the same X and Y for all simulations, and cumulative performances are calculated.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We used X = 0.5 (50%) and Y = 0.02 (2%) in all of our simulations. For better clarity, the following figure shows only 50 of the 100 simulations.<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-16425 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/12\/MCS09-Cumulative.Return.of_.SimC_.png\" alt=\"MCS09-Cumulative.Return.of.SimC\" width=\"752\" height=\"500\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS09-Cumulative.Return.of_.SimC_.png 752w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS09-Cumulative.Return.of_.SimC_-300x199.png 300w\" sizes=\"(max-width: 752px) 100vw, 752px\" \/><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Logically, by changing half of the returns, we <strong>only increase the volatility<\/strong> of the simulations for the majority of the time. This can also be observed in empirical results. The same applies to drawdown. On the other hand, returns oscillate around the original strategy, as expected.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once again, the original strategy&#8217;s performance is in the middle of the simulated strategies \u2013 this time exactly as expected. Next, we calculated various percentiles of the risk and return characteristic to see how well the original strategy performed compared to Monte Carlo simulations.<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-16426 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/12\/MCS10-Table.of_.SimC_.png\" alt=\"MCS10-Table.of.SimC\" width=\"750\" height=\"323\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS10-Table.of_.SimC_.png 750w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS10-Table.of_.SimC_-300x129.png 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/p>\n\n\n\n<p>Lastly, we present a set of histograms that show the frequency of individual values of risk and return characteristics.<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-16427 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/12\/MCS11-Hist.of_.SimC_.png\" alt=\"MCS11-Hist.of.SimC\" width=\"752\" height=\"700\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS11-Hist.of_.SimC_.png 752w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS11-Hist.of_.SimC_-300x279.png 300w\" sizes=\"(max-width: 752px) 100vw, 752px\" \/><\/p>\n\n\n\n<h2><span style=\"font-size: 18pt;\">Monte Carlo simulations of the Trades<\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In the second section, we apply all 3 methods analyzed above, however not to simple monthly returns as above, but rather to the results of the individual trades of our strategy. By \u201ca trade\u201d we understand return of a long or a short position for every individual commodity. It\u2019s interesting to observe the differences between looking at strategy\u2019s pooled monthly returns only and looking at individual trades\u2019 returns.<\/p>\n\n\n\n<h3><strong><span style=\"font-size: 14pt;\"><u>Monte Carlo sampling without replacement <\/u><\/span><\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">We analyze the same three approaches to Monte Carlo simulations. The first one is a simple <strong>random sampling of trades without replacement<\/strong>. For clarity, the following figure shows only 50 of the 100 simulations:<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-16428 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/12\/MCS12-Cumulative.Return.of_.TradesA.png\" alt=\"MCS12-Cumulative.Return.of.TradesA\" width=\"752\" height=\"500\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS12-Cumulative.Return.of_.TradesA.png 752w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS12-Cumulative.Return.of_.TradesA-300x199.png 300w\" sizes=\"(max-width: 752px) 100vw, 752px\" \/><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When sampling trades\u2019 returns without replacement, the volatility of the simulated strategies may or may not be the same as that of the original strategy. This <strong>depends on the strategy construction<\/strong>. In our case it varies slightly. The same applies to returns generated by these Monte Carlo trades simulations. Drawdown is logically entirely different by definition.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The following table shows the percentiles of risk and return characteristics of the simulations and the risk and return characteristics of the original strategy.<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-16429 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/12\/MCS13-Table.of_.TradesA.png\" alt=\"MCS13-Table.of.TradesA\" width=\"750\" height=\"325\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS13-Table.of_.TradesA.png 750w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS13-Table.of_.TradesA-300x130.png 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We may observe the same phenomenon as with the monthly returns \u2013 in most of the simulations the drawdown figure is better than for the original strategy. Additionally, we also plotted the histograms with the frequencies of values of risk and return characteristics.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-16430 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/12\/MCS14-Hist.of_.TradesA.png\" alt=\"MCS14-Hist.of.TradesA\" width=\"752\" height=\"700\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS14-Hist.of_.TradesA.png 752w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS14-Hist.of_.TradesA-300x279.png 300w\" sizes=\"(max-width: 752px) 100vw, 752px\" \/><\/figure>\n\n\n\n<h3><strong><span style=\"font-size: 14pt;\"><u>Monte Carlo sampling with replacement<\/u><\/span><\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Secondly, we sample 100 new matrices by applying <strong>sampling with replacement to trades<\/strong>. The monthly returns of each of the 100 new strategies are calculated and the cumulative returns are plotted. For clarity, the following figure shows only 50 of the 100 simulations:<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-16431 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/12\/MCS15-Cumulative.Return.of_.TradesB.png\" alt=\"MCS15-Cumulative.Return.of.TradesB\" width=\"752\" height=\"500\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS15-Cumulative.Return.of_.TradesB.png 752w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS15-Cumulative.Return.of_.TradesB-300x199.png 300w\" sizes=\"(max-width: 752px) 100vw, 752px\" \/><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Sampling with replacement always produces higher dispersion in results compared to Monte Carlo sampling without replacement. This is also the case for simulation trade returns. We may observe that the volatility of Monte Carlo simulations is noticeably higher and there are multiple outliers in the simulated returns.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-16432 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/12\/MCS16-Table.of_.TradesB.png\" alt=\"MCS16-Table.of.TradesB\" width=\"750\" height=\"324\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS16-Table.of_.TradesB.png 750w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS16-Table.of_.TradesB-300x130.png 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<p>The table shows that the Maximum Drawdown figure still tends to be better for most of the simulations.<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-16433 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/12\/MCS17-Hist.of_.TradesB.png\" alt=\"MCS17-Hist.of.TradesB\" width=\"752\" height=\"700\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS17-Hist.of_.TradesB.png 752w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS17-Hist.of_.TradesB-300x279.png 300w\" sizes=\"(max-width: 752px) 100vw, 752px\" \/><\/p>\n\n\n\n<h3><strong><span style=\"font-size: 14pt;\"><u>Monte Carlo return alterations<\/u><\/span><\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The third approach <strong>changes X% of the trades by Y%<\/strong>. The process is repeated 100-times with the same X (50%) and Y (2%) for all simulations, and performances of the simulated strategies are calculated. For clarity, the following figure again shows only 50 of the 100 simulations:<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-16434 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/12\/MCS18-Cumulative.Return.of_.TradesC.png\" alt=\"MCS18-Cumulative.Return.of.TradesC\" width=\"752\" height=\"500\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS18-Cumulative.Return.of_.TradesC.png 752w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS18-Cumulative.Return.of_.TradesC-300x199.png 300w\" sizes=\"(max-width: 752px) 100vw, 752px\" \/><\/p>\n\n\n\n<p>In our case, Monte Carlo return alteration doesn\u2019t result in a big variation of simulated equity curves. The reason is our strategy construction (equal weighing trades) which mostly averages out our random return alterations.<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-16435 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/12\/MCS19-Table.of_.TradesC.png\" alt=\"MCS19-Table.of.TradesC\" width=\"750\" height=\"324\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS19-Table.of_.TradesC.png 750w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS19-Table.of_.TradesC-300x130.png 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/p>\n\n\n\n<p>This time, the conclusion from this analysis is pretty neutral. The median of Monte Carlo simulations oscillates roughly around the original strategy in all performance metrics. Additionally, we can analyze the following histograms showing the frequencies of values of individual risk and return characteristics.<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-16436 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/12\/MCS20-Hist.of_.TradesC.png\" alt=\"MCS20-Hist.of.TradesC\" width=\"752\" height=\"700\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS20-Hist.of_.TradesC.png 752w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS20-Hist.of_.TradesC-300x279.png 300w\" sizes=\"(max-width: 752px) 100vw, 752px\" \/><\/p>\n\n\n\n<h2><span style=\"font-size: 18pt;\">Comparison against Random Strategies<\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This Monte Carlo method is utilized to create a set of random strategies to compare the original strategy against. It is based on assumption that your <strong>original strategy should outperform majority of the random strategies<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We again use data on individual trades. Technically, we firstly randomly choose which commodities are traded each month. Secondly, we randomly go long, or short, or stay in cash with each chosen commodity. The process is again repeated 100-times. For clarity, the following figure shows only 50 of the 100 simulations:<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-16437 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/12\/MCS21-Cumulative.Return.of_.RandomA.png\" alt=\"MCS21-Cumulative.Return.of.RandomA\" width=\"752\" height=\"500\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS21-Cumulative.Return.of_.RandomA.png 752w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS21-Cumulative.Return.of_.RandomA-300x199.png 300w\" sizes=\"(max-width: 752px) 100vw, 752px\" \/><\/p>\n\n\n\n<div>\n<p><span lang=\"EN-US\">Random trades by definition oscillate around zero for the majority of time. This should be one of the easier hurdles for your strategy to pass. This Monte Carlo testing set serves as an <b>independent<\/b> (of your strategy) <b>benchmark<\/b> which should be outperformed.<\/span><\/p>\n<\/div>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-16438 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/12\/MCS22-Table.of_.RandomA.png\" alt=\"MCS22-Table.of.RandomA\" width=\"750\" height=\"324\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS22-Table.of_.RandomA.png 750w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS22-Table.of_.RandomA-300x130.png 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-16439 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/12\/MCS23-Hist.of_.RandomA.png\" alt=\"MCS23-Hist.of.RandomA\" width=\"752\" height=\"700\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS23-Hist.of_.RandomA.png 752w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/12\/MCS23-Hist.of_.RandomA-300x279.png 300w\" sizes=\"(max-width: 752px) 100vw, 752px\" \/><\/p>\n\n\n\n<h2><span style=\"font-size: 18pt;\">Comparison of different Monte Carlo methods<\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">We analyzed and presented results for 4 different Monte Carlo simulations methods applied to a commodity futures trading strategy. We applied them to both \u2013 monthly returns of the strategy and single individual trades of the strategy.<\/p>\n\n\n\n<h3><strong><span style=\"font-size: 14pt;\"><u>Monthly returns vs. Individual trades<\/u><\/span><\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The choice whether to use time-series returns (e.g. monthly) or trades\u2019 returns highly <strong>depends on your needs<\/strong>. If you are a swing trader who focuses on each separate trade then probably the trade analyzes would be more suitable for you. On the other hand, if you are a diversified investor who averages different assets or different approaches then time-series returns (period returns) should be easier for you to use.<\/p>\n\n\n\n<h3><span style=\"font-size: 14pt;\"><strong><u>Monte Carlo strategy simulations without replacement<\/u><\/strong><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">One of the <strong>softer Monte Carlo simulations<\/strong> for trading strategies is sampling without replacement. This method only changes the order of returns. Hence, it doesn\u2019t change volatility, nor average return. It\u2019s mainly useful for drawdown analysis and for examination of shapes of strategies\u2019 equity curves. It\u2019s the stress test for those, who expect similar returns for the strategy in the future, just occurring at different times.<\/p>\n\n\n\n<h3><strong><span style=\"font-size: 14pt;\"><u>Monte Carlo strategy simulations with replacement<\/u><\/span><\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Monte Carlo sampling with replacement is probably <strong>the most widely used method<\/strong> for simulating hypothetical scenarios of quantitative strategies. By using simulations with replacement, we create several \u201cnew histories\u201d and randomize also return and risk of the strategy. It\u2019s used by those who believe the returns of the strategy will be distributed roughly similarly in the future, but who don\u2019t believe they will be same.<\/p>\n\n\n\n<h3><strong><span style=\"font-size: 14pt;\"><u>Monte Carlo return alteration<\/u><\/span><\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Monte Carlo alteration of strategy\u2019s returns is basically a <strong>sensitivity analysis<\/strong> and should be used and perceived like that. It helps to analyze how big is the impact of pre-specified random changes to a pre-specified share of strategy\u2019s returns. The less deteriorated the simulation results are, the better.<\/p>\n\n\n\n<h3><span style=\"font-size: 14pt;\"><u><strong>Comparison against random strategies<\/strong><\/u><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Probably everybody knows a Malkiel\u2019s monkey beating stock markets. It\u2019s always useful to take a look <strong>how your strategy performs against random strategies<\/strong>. And this is exactly the purpose of this Monte Carlo method. Logically, one would expect their strategy to outperform random variants convincingly.<strong>&nbsp;<\/strong><\/p>\n\n\n\n<h2><span style=\"font-size: 18pt;\">Conclusion<\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">We presented, explained and analyzed multiple approaches to Monte Carlo simulations. We also performed a real case study of Monte Carlo simulations applied to a commodity futures trading strategy.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Different Monte Carlo methods may be valuable for different end-users. It\u2019s crucial to understand how they work and how to interpret them. You can learn that easily from our article above.<\/p>\n\n\n\n<p><strong>Author:<br>Daniela Hanicova, Quant Analyst, Quantpedia<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"block-854363cc-8450-4dc0-a06a-c737766e9431\"><strong>Are you looking for more strategies to read about? <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/sign-up-for-our-newsletter\/\">Sign up for our newsletter<\/a> or visit our <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/blog\/\">Blog<\/a> or <a href=\"http:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/Screener\">Screener<\/a><\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"block-65925002-6290-4d3b-b5cd-f3a277851ec8\"><strong>Do you want to learn more about Quantpedia Premium service? Check <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/how-it-works\/\">how Quantpedia works<\/a>, <a href=\"http:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/Home\/About\">our mission<\/a> and <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/pricing\/\">Premium pricing offer<\/a>.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"block-34bf63ae-5a22-40a3-aeb4-769374e833d8\"><strong>Do you want to learn more about Quantpedia Pro service? Check its <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/how-it-works\/quantpedia-pro\/\">description<\/a>, watch <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/how-it-works\/quantpedia-explains\/\">videos<\/a>, review <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/how-it-works\/quantpedia-pro-reports\/\">reporting capabilities<\/a> and visit our <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/pricing-pro\/\">pricing offer<\/a>.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"block-21942b3a-14d9-4c0f-b8ef-04d64675e253\"><strong>Are you looking for historical data or backtesting platforms? Check our list of&nbsp;<a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/links-tools\/?category=algo-trading-discounts\">Algo Trading Discounts<\/a><\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Would you like free access to <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/pricing\/\" title=\"\">our services<\/a>? Then, <a href=\"https:\/\/lightspeed.com\/lp\/quantpedia-lightspeed-financial-services-group-one-free-year-promotion\" title=\"\">open an account with Lightspeed<\/a> and enjoy one year of Quantpedia Premium at no cost.<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"block-4c45d6c9-c8dd-4283-8743-bf573cfa4d45\"><strong>Or follow us on:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"block-476e95ed-31a5-4c4d-b701-5203f9fb2e24\"><strong>Facebook <a href=\"https:\/\/www.facebook.com\/groups\/quantstrategies\">Group<\/a>, Facebook <a href=\"https:\/\/www.facebook.com\/quantpedia\/\">Page<\/a>, <a href=\"https:\/\/twitter.com\/quantpedia\">Twitter<\/a>, <a href=\"https:\/\/www.linkedin.com\/company\/quantpedia\">Linkedin<\/a>, <a href=\"https:\/\/quantpedia.medium.com\/\">Medium<\/a> or <a href=\"https:\/\/www.youtube.com\/channel\/UC_YubnldxzNjLkIkEoL-FXg\">Youtube<\/a><\/strong><\/p>","protected":false},"excerpt":{"rendered":"<p><strong>The Monte Carlo method (Monte Carlo simulations) is a class of algorithms that rely on a repeated random sampling to obtain various scenario results. Monte Carlo simulations are used to predict the probability of different outcomes when it would be difficult to use other approaches such as optimization. The main aim is to create alternative scenarios, which account for possible risk and help with decision making. The simulations are used in various fields, from finance and quantitative analysis to engineering or science. We plan to unveil our new \u201cMonte Carlo\u201d report for <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/pricing-pro\/\">Quantpedia Pro<\/a> clients in a next few days, and this article is our introduction to different methodologies that can be used for Monte Carlo calculation.<\/strong><\/p>","protected":false},"author":24306,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[159,182],"class_list":["post-16416","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-own-research","tag-theory-of-portfolio-management"],"_links":{"self":[{"href":"https:\/\/vvv.quantpedia.com\/es\/wp-json\/wp\/v2\/posts\/16416","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vvv.quantpedia.com\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vvv.quantpedia.com\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vvv.quantpedia.com\/es\/wp-json\/wp\/v2\/users\/24306"}],"replies":[{"embeddable":true,"href":"https:\/\/vvv.quantpedia.com\/es\/wp-json\/wp\/v2\/comments?post=16416"}],"version-history":[{"count":0,"href":"https:\/\/vvv.quantpedia.com\/es\/wp-json\/wp\/v2\/posts\/16416\/revisions"}],"wp:attachment":[{"href":"https:\/\/vvv.quantpedia.com\/es\/wp-json\/wp\/v2\/media?parent=16416"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vvv.quantpedia.com\/es\/wp-json\/wp\/v2\/categories?post=16416"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vvv.quantpedia.com\/es\/wp-json\/wp\/v2\/tags?post=16416"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}