Key Performance Indicator and Backtesting
Usage:
- Measuring expected performance of a trading strategy by testing it on historical data.
- Measure both risk and return characterstics of the statergy.
- History Repeats Itself - Historical performance forecasts future performance.
Popular performance measures include
- Cumulative Annual Growth Rate
- Annualized Voltility
- Sharpe Ratio
- Sortino Ratio
- Maximum Drawdown
- Calmar Ratio
Installation
pip install KPIs
Importing Methods
from KPIs import(
CAGR,
Volatility,
SharpeRatio,
Sortino,
MaxDrawdown,
Calmar,
)
Calling a function
CAGR_Value=CAGR(ticker)
print("Cumulative annual growth rate of {} = {}".format(ticker,CAGR_Value))
Example
from KPIs import(
CAGR,
)
ticker="AMZN"
CAGR_Value=CAGR(ticker)
print("Cumulative annual growth rate of {} = {}".format(ticker,CAGR_Value))
Note
- I have tried to implement all key performance measures, will be updating with more methods soon. Thanks for your patience.
Change Log
0.1
-First Release
Release files for KPIs 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| KPIs-0.1.tar.gz | 3.2 kB | Details |
Release files / KPIs-0.1.tar.gz
| Download URL | KPIs-0.1.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
262d6c8bf241624c7a267b86f0b1fe5b50b0d1ee81523a438659c28d202b8350
|
|
BLAKE2b-256 checksum How to use checksums |
146d145c805fde9b3b993ed5086216ff63cfd455ec0dbd6efa908dc1249e1680
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.7
|