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-1.0.0.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

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

DeltaU-1.0.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for deltau-1.0.0.tar.gz
Algorithm Hash digest
SHA256 6a9ae58ef98d39ed40587a35ff321401d0e5e1155ec597a44f4c8e63845520c8
MD5 44b4e0ddd51f49438ba0b61a2b1c5a10
BLAKE2b-256 93fc39b3728cf69e938fa838827f7322466fbfc905c9530935506f07cf0f8f3b

See more details on using hashes here.

File details

Details for the file DeltaU-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: DeltaU-1.0.0-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-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3c6e59018558504838aeb54598e3a5fa448406fc774fd5217f977f23f6ab4b87
MD5 0ebe0eaea20f22738cce51472c5a3906
BLAKE2b-256 08d1232166e35683264216d2e4d691831e8e98852838018b083a8f0b243a3471

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