Monte Carlo simulation software?

Discuss all general (i.e. non-personal) investing questions and issues, investing news, and theory.
Post Reply
rosamlorente
Posts: 1
Joined: Tue Nov 04, 2008 6:25 am

Re: Monte Carlo simulation software?

Post by rosamlorente » Tue Nov 04, 2008 6:40 am

HerbertSitz wrote:I'm curious what people are using to do their Monte Carlo simulations. Is there any open source stuff out there to play with?
See GNU MCSim: fredomatic.free.fr

User avatar
gatorking
Posts: 1103
Joined: Tue Feb 20, 2007 6:15 pm
Location: Burlington MA

MCSim

Post by gatorking » Tue Nov 04, 2008 7:14 am


Quantext
Posts: 31
Joined: Thu Nov 29, 2007 11:49 pm

Monte Carlo for portfolio simulation

Post by Quantext » Tue Nov 04, 2008 11:29 am

Hi guys:

My name is Geoff Considine--I built Quantext Portfolio Planner. I tried to post some relevant articles, but I could not due to the filters here. I will try to explain without links.

The challenge of Monte Carlo simulation is to generate forward-looking parameters for a portfolio. This is much harder than the basic problem of simply simulating mean, standard deviation, and covariances. You have to develop the estimates for the means and standard deviations and, on top of this, how to deal with covariances--and you don't want to just use history.

Geoff

User avatar
Robinhood
Posts: 165
Joined: Mon Jan 28, 2008 12:37 pm
Location: Boston, MA

Post by Robinhood » Tue Nov 04, 2008 11:50 am

Thanks Gatorking. That's a tool I've been looking for.

User avatar
dothemontecarlo
Posts: 539
Joined: Tue Nov 06, 2007 10:19 am
Location: Colorado
Contact:

Re: Monte Carlo for portfolio simulation

Post by dothemontecarlo » Tue Nov 04, 2008 2:04 pm

Quantext wrote:Hi guys:

My name is Geoff Considine--I built Quantext Portfolio Planner. I tried to post some relevant articles, but I could not due to the filters here. I will try to explain without links.

The challenge of Monte Carlo simulation is to generate forward-looking parameters for a portfolio. This is much harder than the basic problem of simply simulating mean, standard deviation, and covariances. You have to develop the estimates for the means and standard deviations and, on top of this, how to deal with covariances--and you don't want to just use history.

Geoff
Here's a link to Geoff's Quantext Portfolio Planner.

Geoff, how, if at all, do you model mean reversion in your simulation? Do you assume that returns are log-normally distributed? That returns are completely independent of past returns?

As far as covariances are concerned, do you project future covariances that are fixed, or do you model them as varying?

Best regards,
dothemontecarlo

Quantext
Posts: 31
Joined: Thu Nov 29, 2007 11:49 pm

Brief Overview of QPP

Post by Quantext » Tue Nov 04, 2008 4:46 pm

First, I have an article on SeekingAlpha that shows a nine-year out-of-sample portfolio analysis using QPP to develop the asset allocations. This is benchmarked against buy-and-hold, annual rebalance, etc. The article is called Testing Forward Looking Asset Allocation, dated October 22.

I have a range of detailed articles that explain how QPP works, but to address the questions:

1) QPP is a non-stationary model, but does assume normal returns ' lognormal prices

2) QPP handles portfolio covariance using a model that is somewhat proprietary..so I cannot give exact details. I have a detailed discussion in some articles, and I compare to Style Analysis in one called:

Diversifying Portfolios With Market And Non-Market Correlations

This is on SeekingAlpha and it is from April 2006. If you read this, please note that QPP was projecting volatility would be twice as high, on average, as the recent years had been...this goes to the other question about Reversion to the Mean:

Generating Meaningful Outlooks for Portfolio Performance

This article is on SeekingAlpha and is dated March 1, 2007.

Quantext
Posts: 31
Joined: Thu Nov 29, 2007 11:49 pm

Overtuning models

Post by Quantext » Tue Nov 04, 2008 4:54 pm

As far as Gatorman's comment about having a portfolio that looked good in the model but blows up in practice:

All models can be overfitted / overtuned. QPP and other good monte carlo models use theory in combination with data to help in building better portfolios--and QPP has tested well out-of-sample---I have many studies available publicly--including by third parties. The fact remains that models can always be overfitted. I have suggested many times that if a model (any model) gives results that cannot be explained or are inconsistent with reliable people and models, this is a bad sign.

The good news is that there are consistent standards emerging. I just wrote an article in which I showed that QPP's estimates of risk for a set of stocks were remarkably consistent with some results from RiskGrades, for example. I have also shown consistent results with sources like Ibbotson, and discussions by David Swensen and El-Erian.

User avatar
dothemontecarlo
Posts: 539
Joined: Tue Nov 06, 2007 10:19 am
Location: Colorado
Contact:

Re: Brief Overview of QPP

Post by dothemontecarlo » Tue Nov 04, 2008 5:10 pm

Quantext wrote:First, I have an article on SeekingAlpha that shows a nine-year out-of-sample portfolio analysis using QPP to develop the asset allocations. This is benchmarked against buy-and-hold, annual rebalance, etc. The article is called Testing Forward Looking Asset Allocation, dated October 22.

I have a range of detailed articles that explain how QPP works, but to address the questions:

1) QPP is a non-stationary model, but does assume normal returns ' lognormal prices

2) QPP handles portfolio covariance using a model that is somewhat proprietary..so I cannot give exact details. I have a detailed discussion in some articles, and I compare to Style Analysis in one called:

Diversifying Portfolios With Market And Non-Market Correlations

This is on SeekingAlpha and it is from April 2006. If you read this, please note that QPP was projecting volatility would be twice as high, on average, as the recent years had been...this goes to the other question about Reversion to the Mean:

Generating Meaningful Outlooks for Portfolio Performance

This article is on SeekingAlpha and is dated March 1, 2007.
I'm not asking you to disclose anything you would regard as a trade secret, but how are the expected returns in your model non-stationary?

My non-secret monte carlo retirement calculator models stock returns as if they were lognormally distributed, but with a cumulative-performance-dependent mean. The degree to which past performance affects future results depends on the "reversion-to-the-mean" time variable specified by the user.

Imagine a user specifies a 25-year RTM factor and a 4% expected annualized real return on the stock part of his portfolio. The simulation starts with the expected annualized return (converted to an arithmetic return) and standard deviation specified by the user. Say the first random return for simulation year #1 is -30%. The program calculates what is, in essence, the "YTM" that it would take over the next 25 years to result in an annualized return, over the entire 26-year period, of 4%/year. In this example, it would take an expected subsequent annualized return of 5.66%/year over the next 25 years for the cumulative return, over the entire 26-year period, to "revert" back to the originally expected annualized 4%/year. The lognormal distribution about which the next random return number is generated is then centered around the arithmetic equivalent of an annualized 5.66% return.

This is repeated every year, each time calculating the "YTM" it would take over the subsequent 25 years to get the return over the entire simulation period to "revert" back to the mean.

The effect is that you have a shifting lognormal distribution.

I tested several large series of mean-reverting variables like this in Excel, and confirmed that it did not meaningfully change the overall standard deviation. That is, if you generated a histogram of these mean-reverting randomly generated variables, it would still look a whole lot like a random-walk distribution.

The advantage of this approach is that it reduces the dispersion of long-term results while preserving a wide distribution of short-term results.

Just wondering... does QPP model mean reversion in the same or a similar way?

Also, to what extent does QPP let the user specify the expected returns going forward. Does the user have to depend on your quantitative forecast models? What if the user is more optimistic or pessimistic about returns going forward?

Quantext
Posts: 31
Joined: Thu Nov 29, 2007 11:49 pm

QPP and Mean Reversion

Post by Quantext » Tue Nov 04, 2008 6:02 pm

QPP handles mean reversion in a very different way than you are proposing. QPP gets historical data and uses these to generate volatility projections for each asset in the portfolio. QPP then calculates a "fair" expected return based on this volatility projection. If an asset class has high historical returns relative to risk, QPP's projections will be lower and vice versa.

Quantext
Posts: 31
Joined: Thu Nov 29, 2007 11:49 pm

Adjusting the outlook in QPP

Post by Quantext » Tue Nov 04, 2008 6:04 pm

oops--just realized I did not answer your whole question:

The user can adjust the worldview by (1) adjusting the assumed equity risk premium or (2) by hand adjusting the expected return for each asset. There is a version of the model (called QRP) in which you can adjust all parameters (individual volatilies, Betas, etc.) but getting an internally consistent dataset when you change these factors by hand can be challenging.

User avatar
dothemontecarlo
Posts: 539
Joined: Tue Nov 06, 2007 10:19 am
Location: Colorado
Contact:

Re: QPP and Mean Reversion

Post by dothemontecarlo » Tue Nov 04, 2008 7:04 pm

Quantext wrote:QPP handles mean reversion in a very different way than you are proposing. QPP gets historical data and uses these to generate volatility projections for each asset in the portfolio. QPP then calculates a "fair" expected return based on this volatility projection. If an asset class has high historical returns relative to risk, QPP's projections will be lower and vice versa.
Sounds like a novel and fascinating approach to me. Thanks for the replies.

Post Reply