Project G: Financial Monte Carlo
Overview
The goal of this project is to build a Monte Carlo simulation to aid in financial planning.
Client: Scott Kay, eMoney Advisor
Background
Monte Carlo simulation is a statistical algorithm which we use to calculate the probability of uncertain future
events, such as the value of the stock market in the years to come. The algorithm substitutes uncertain variables
with random values constrained to a real-world historical model. Many simulations are performed with different
random values and probabilistically combined to get the distribution of possible outcomes. Advisors use the
result of a Monte Carlo simulation to analyze and discuss the risk of a client's portfolio.
The uncertain variables in this project are the value of 10 market indexes which we will select. We will provide a
correlation matrix for the indexes as the real-world historical model. The simulator will calculate the outcome of
the uncertain variables for a client's portfolio at yearly intervals.
There are numerous kinds of accounts and financial instruments which may comprise a client's portfolio. We have
chosen 5 kinds for this project, described below. We'll explain all of these in more detail with you, so do not
be alarmed by some of the financial verbiage.
-
Income
A source of income with a starting year, ending year, and a yearly value which increases at a defined flat
growth rate. A client may have multiple sources of income. Examples include salary from a job, social security,
or an annuity like a lottery payout.
-
Living Expenses
A single value representing the yearly cost of living which increases at a defined flat growth rate. This
figure incorporates expenses such as groceries, clothes, rent, gas, electricity, electronics, internet,
mobile phone service, entertainment, etc...
-
Loans
A debt with a starting year, term (length of the loan), outstanding balance, annual payment, and a fixed
interest rate. A client may have multiple loans. Examples include a college loan, mortgage, or a car loan.
-
Taxable Investments
An account in which you deposit income after taxes and pay taxes on yearly growth. Comprised of a starting
amount, fixed interest rate, and a list of market index investments. For example, we may be investing 42% in
the Dow Jones index and the remaining 58% in the S&P 500. Examples include a checking account or a money
market account.
-
Tax Advantaged Investments
A retirement account in which different tax rules apply as an incentive to save for the future. Penalties are
incurred if the investment if withdrawn before retirement. Comprised of a starting amount, fixed interest rate,
and a list of market index investments. Examples include 401k and IRAs. There are 2 kinds:
-
Roth
An account in which you deposit income after taxes and do not pay taxes on yearly growth. Money can
be withdrawn at no penalty up to the amount that has been deposited. A penalty of 10% is incurred
if extra money coming from the investment growth is withdrawn before retirement.
-
Traditional
An account in which you deposit income before taxes and do not pay taxes on yearly growth. Money can
be withdrawn at no penalty during retirement but you have to pay taxes on any withdrawals. A penalty
of 10% is incurred on top of the taxes if any money is withdrawn before retirement.
Simulator
The simulator will load a file representing the client's portfolio in current dollars. It will compute the yearly
values of each account starting from the current year up until the client's death. For each year, the simulation
will distribute income to loan payments and to investments and apply taxes and growth rates. The Monte Carlo
algorithm will be used to populate the uncertain values and statistically aggregate the results. Results of the
simulation will be output to the console in any comprehensible format.
Technology
- The programming language is up to you, but C# or Java will work fine.
- Mathematical modeling involving a correlation matrix.
* Should you choose to develop with C#, we can provide assistance to setup your server environment and tool chain.