Skip to main content

Key Performance Indicator and Backtesting

Project description

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

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

KPIs-0.1.tar.gz (3.2 kB view details)

Uploaded Source

File details

Details for the file KPIs-0.1.tar.gz.

File metadata

  • Download URL: KPIs-0.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.7

File hashes

Hashes for KPIs-0.1.tar.gz
Algorithm Hash digest
SHA256 262d6c8bf241624c7a267b86f0b1fe5b50b0d1ee81523a438659c28d202b8350
MD5 28131aec33cc3be4c29863b9e894ecc3
BLAKE2b-256 146d145c805fde9b3b993ed5086216ff63cfd455ec0dbd6efa908dc1249e1680

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page