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:
<img width="736" alt="image" src="https://github.com/JerBouma/FinanceToolkit/assets/46355364/95c3eb94-4e3f-494d-99f3-262fdca5fe2f">
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:
<img width="683" alt="image" src="https://github.com/JerBouma/FinanceToolkit/assets/46355364/3e933b4e-0f74-41f6-a651-67619ed06950">
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:
<img width="927" alt="image" src="https://github.com/JerBouma/FinanceToolkit/assets/46355364/ad9160c7-3659-49ca-889c-dcd15b89f78d">
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.
___
<b><div align="center">Find a variety of How-To Guides including Code Documentation for the FinanceToolkit <a href="https://www.jeroenbouma.com/projects/financetoolkit">here</a>.</div></b>
___