Skip to content

raph333/leverage-simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leverage simulation

Method:

  • Data: daily historical prices of the SP500 index starting in 1927 obtained from yahoo finance
  • The leverage is applied daily like it would with a leveraged ETF
  • For each simulation-run, a timeframe of n_years consecutive years is randomly selected
  • For each run and for each leverage-value, the multiple of the return is calculated
  • This is repeated n_simulations times
  • The distribution of outcomes is analyzed

Purpose:

  • Just out of curiosity estimating the effect of leverage on a pension portfolio (see this book). (Needless to say, this is not investment advice.)
  • Testing ChatGPT to code faster: it's quite useful for creating plots and refactoring

About

simple simulation of leverage on historical data of the SP500 index

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors