Skip to content

Commit

Permalink
Merge pull request #37 from lifelib-dev/merge-econcurvs
Browse files Browse the repository at this point in the history
Merge economic_curves
  • Loading branch information
fumitoh authored Nov 19, 2022
2 parents 7478845 + b77142d commit 1863833
Show file tree
Hide file tree
Showing 67 changed files with 3,467 additions and 4,057 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
<h1 align="center" style="border-botom: none">
<b>
🐍 Risk free curve test 🐍
</b>
</h1>

</br>
# Risk free curve test

The risk free curve is one of the principal inputs into an economic scenario generator. This test recalculates the risk free curve using the parameters that are claimed to be used.

Expand Down

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions lifelib/libraries/economic_curves/Metropolis_Hastings/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Bayesian validation of the Economic Scenario Generator using Black-Sholes-Merton model

Economic Scenario Generators simulate potential future paths of financial indicators such as interest rates,
indices and spreads. Most of them do this by assuming that the economy behaves according to a certain stochastic process
and present multiple sample paths of this process.

To simulate this, the code bellow generates 1000 scenarios from the Black-Sholes-Merton model.
Each scenario simulates 50 years in annual increments.

To calculate the most likely parameters used to generate the scenarios, the Maximum Likelihood method is normaly used.
This method could be used in this case since the normal distribution has a well known solution.
However there are cases where the maximum likelihood estimator does not have a closed solution.

What is required is to know a function that is able to tell,
how much more likely is that the observed data came from one set of parameters as opposed to another set.

A possible solution to this is to use the [Metropolis Hastings](https://en.wikipedia.org/wiki/Metropolis%E2%80%93Hastings_algorithm) algorithm.
To directly quote Wikipedia:

> In statistics and statistical physics,
> the Metropolis–Hastings algorithm is a Markov chain Monte Carlo (MCMC) method
> for obtaining a sequence of random samples from a probability distribution
> from which direct sampling is difficult. This sequence can be used to approximate the distribution.
<b> The distribution of interest is the distribution of most likely parameter combinations.</b>

If the likelihood function is corectly implemented, the distribution should peak at the parameter set, that was set up in the ESG run.
Loading

0 comments on commit 1863833

Please sign in to comment.