Skip to main content

A backtesting and performance analysis package

Project description

DeltaU

DeltaU is a backtesting and performance analysis package for quantitative trading strategies.

Installation

You can install DeltaU using `pip install deltau':

Usage

Example usage:

from DeltaU.core.backtester import Backtester, Executor
from DeltaU.visualization.tear_sheet import TearSheet

# Create a strategey and generate signals
def class MyStrategy:
     def __init__(self, window=1):
        self.window = window
        
        def generate_signals(self, data):
            #generate signals

             return signals

# Instantiate the strategy, executor, and backtester
strategy = MyStrategy(window=self.window)
executor = Executor(initial_capital=initial_capital)
backtester = Backtester(strategy=strategy, executor=executor, data=data)

# Run the backtest
portfolio_values, final_metrics = backtester.run()

# Create a TearSheet object with the results and metrics
tear_sheet = TearSheet(backtest_results=portfolio_values, metrics=final_metrics)

# Generate the report and show plots
tear_sheet.display_report()

## In case you get an error when calling tear_sheet function while using jupyter 
## Copy and paste: pip install nbformat>=4.2.0 into your envrionment, restart the environment and than re-run the code.

Project details


Download files

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

Source Distribution

deltau-0.1.1.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deltau-0.1.1-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file deltau-0.1.1.tar.gz.

File metadata

  • Download URL: deltau-0.1.1.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.7

File hashes

Hashes for deltau-0.1.1.tar.gz
Algorithm Hash digest
SHA256 32a8c9b608b7875f10c24d8b0a18b82e85f060516632178586ae14fb1e453453
MD5 9057dcf615954ed9149e1e7e91ad1319
BLAKE2b-256 375c85d03553aee10209c64fcd35444081f8f5c2f4c3aade4056f7804c9f03c5

See more details on using hashes here.

File details

Details for the file deltau-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: deltau-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.7

File hashes

Hashes for deltau-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b793876f2a9ffd924bb1ec7b848d17a464dca4d9f195160802a822fac0c4aec1
MD5 e8c8ef820255edc48252ca12caf39ecc
BLAKE2b-256 958451b45a20a01e7b3bce32631c202e7762bb07f88037fa62e6acda1c1b6e7d

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