Skip to content

FinanceToolkit v1.3.3

Compare
Choose a tag to compare
@JerBouma JerBouma released this 10 Sep 16:31
· 481 commits to main since this release

This new release features a whole lot of new features yet again. This includes the following:

Performance Metrics

There is now a large list of performance metrics to be found in the performance class in similar fashion as e.g. ratios. This gets you the following:

  • Alpha
  • Jensen's Alpha
  • Beta
  • Capital Asset Pricing Model (CAPM)
  • Treynor Ratio
  • Sharpe Ratio
  • Sortino Ratio
  • Ulcer Performance Index (UPI)
  • M2 Ratio
  • Tracking Error
  • Information Error

This is an extra powerful class as you can get these ratios "within" periods. This means that if you select the period "quarterly", it will calculate the ratios for the days within each quarter. As an example:

image

Risk Metrics

Not only Performance Metrics are added in but courtesy of @northern-64bit, it is now also possible to observe the following risk metrics:

  • Value at Risk (VaR) with distributions Historical, Gaussian, Student-t, Cornish-Fisher.
  • Conditional Value at Risk (cVaR) with distributions Historical, Gaussian, Laplace, Logistic.
  • Entropic Value at Risk (eVaR) with a Gaussian distribution.
  • Ulcer Index (UI)
  • Maximum Drawdown (MDD)
  • Skewness
  • Kurtosis

Just like with the performance metrics, you can view these for within each period as well. E.g. on a weekly basis:

image

Risk Free Rates and Benchmarks

Within the Toolkit class (upon initialisation) a benchmark can be defined. By default this is set to "^GSPC" which is the S&P 500 index. This benchmark is required to calculate metrics such as CAPM, Beta and (Jensens Alpha) and is very neat to have when you wish to analyze and compare tickers. It is of course possible to change this benchmark ticker to anything (or disable it by setting it to None).

Next to that, it is also possible to define a risk free rate, this can be '13w', '5y', '10y' or '30y' and defaults to '10y'. Both settings will lead to different results for some of the calculations and it is therefore important you set a benchmark and risk free rate that matches your beliefs and analysis. As an example:

image

Other than that, many improvements behind the scenes were made. E.g. it is now really easy to add new ratios since all the data has been prepared properly and some fixes have been made to data that could sometimes mess up in niche scenarios. Next to that, the documentation has been greatly extended: https://www.jeroenbouma.com/projects/financetoolkit/docs.


Find a variety of How-To Guides including Code Documentation for the FinanceToolkit here.