Skip to main content

A comprehensive Python quantitative finance library

Project description

DeltaFQ

中文 | English

Version Platform Python Build License

A Python-based quantitative trading system development framework focused on strategy research, backtesting execution, and performance visualization. Simulated trading and live trading features are under development.

Installation

pip install deltafq
  • Optional components like Plotly and TA-Lib can be installed via pip install deltafq[viz] and pip install deltafq[talib].

Core Modules

deltafq/
├── data        # Data acquisition, cleaning, storage interfaces (stocks, funds)
├── indicators  # Technical indicators and factor calculations
├── strategy    # Signal generators and strategy base classes
├── backtest    # Backtest execution, performance metrics, reporting
├── charts      # Signal/performance chart components
└── trader      # Trading execution and risk control (ongoing expansion)

Quick Start (BOLL Strategy)

import deltafq as dfq

symbol = "AAPL"
fetcher = dfq.data.DataFetcher()
indicators = dfq.indicators.TechnicalIndicators()
signals = dfq.strategy.SignalGenerator()
engine = dfq.backtest.BacktestEngine(initial_capital=100_000)
reporter = dfq.backtest.PerformanceReporter()
chart = dfq.charts.PerformanceChart()

data = fetcher.fetch_data(symbol, "2023-01-01", "2023-12-31", clean=True)
bands = indicators.boll(data["Close"], period=20, std_dev=2)
signal_series = signals.boll_signals(price=data["Close"], bands=bands, method="cross_current")

trades_df, values_df = engine.run_backtest(symbol, signal_series, data["Close"], strategy_name="BOLL")

reporter.print_summary(symbol, trades_df, values_df, title=f"{symbol} BOLL Strategy", language="en")
chart.plot_backtest_charts(values_df=values_df, benchmark_close=data["Close"], title=f"{symbol} BOLL Strategy")
  • More example scripts: examples
    • Stock data fetching: 01_fetch_yahoo_data.py
    • Fund data fetching: 11_fetch_fund_data.py

Community & Contributing

  • Welcome to provide feedback and submit improvements via Issue or PRs.

License

MIT License. See LICENSE for details.

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

deltafq-0.5.3.tar.gz (38.5 kB view details)

Uploaded Source

Built Distribution

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

deltafq-0.5.3-py3-none-any.whl (47.5 kB view details)

Uploaded Python 3

File details

Details for the file deltafq-0.5.3.tar.gz.

File metadata

  • Download URL: deltafq-0.5.3.tar.gz
  • Upload date:
  • Size: 38.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for deltafq-0.5.3.tar.gz
Algorithm Hash digest
SHA256 3536bdc647ad3468c1de55d4f448958b7bafd17b63ee8f051123f53d932e333f
MD5 9ad8c4e2610f247fdb8b4097831d1222
BLAKE2b-256 d90808a7e263bae34d8725195b21483a318e855cf0649914d493a095b273febf

See more details on using hashes here.

File details

Details for the file deltafq-0.5.3-py3-none-any.whl.

File metadata

  • Download URL: deltafq-0.5.3-py3-none-any.whl
  • Upload date:
  • Size: 47.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for deltafq-0.5.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2a27024a0edf9bf263ec0269ce25d41b2c49c6ed6c75fcb94f01e9082323c88e
MD5 19bf400c6153cfbc379b9d8cb737007b
BLAKE2b-256 b0168c42d5b3b6ca66acc03ae476aee490ea7d29ae95400903dfd7582c712db9

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