Skip to main content

AMQuant - Quick Start Guide

Overview

AMQuant is an open-source Python library for quantitative finance that provides:

  • Market data loading
  • OHLCV time series management
  • Feature engineering
  • A clean Python API for research, backtesting and quantitative analysis

Unlike the original script-based implementation, AMQuant is now a fully installable Python package available through PyPI.


1. Create a Python Virtual Environment

It is recommended to work inside a virtual environment.

Linux / macOS

python3 -m venv .venv
source .venv/bin/activate

Windows

python -m venv .venv
.venv\Scripts\activate

2. Install AMQuant

From PyPI

pip install amquant

3. Usage Example

import amquant

# Load market data for an explicit date range.
# fromdate / todate accept "YYYY-MM-DD" strings, date/datetime objects,
# or raw unix seconds.
result = amquant.load_market_data(
    fromdate="2024-01-01",
    todate="2024-06-01",
)

# Loading summary
print(f"Loaded : {result.ok}")
print(f"Failed : {result.failed}")
print(f"Skipped: {result.skipped}")

# Access raw market data
aapl_series = result.raw_series["AAPL"]

# Access engineered features
aapl_features = result.feature_sets["AAPL"]

# Alternatively, if update_globals=True (default)
aapl_series = amquant.RAW_SERIES["AAPL"]
aapl_features = amquant.FEATURE_SETS["AAPL"]

# Get description of any feature
print(describe("macd_hist"))
print(describe("bb_percent_b"))
print(describe("vol_20"))
print(describe("rsi_14"))

feature_summary()        # Nice printed overview
print(list_features())   # All feature names

If fromdate / todate are omitted, load_market_data() defaults to a trailing 1-year window (today − 365 days → today).

Downloading a Single Symbol

Every instrument in the universe is fetched through the same download(what, fromdate, todate) call under the hood. You can use it directly if you just want one symbol without going through the full universe/feature pipeline:

from amquant.yahoo_finance import YahooFinanceClient

client = YahooFinanceClient()
series = client.download("AAPL", "2024-01-01", "2024-06-01")

print(series.symbol, len(series.bars))

Returned Object

load_market_data() returns a LoadResult dataclass containing both the loaded data and execution statistics.

Attribute Description
result.raw_series Dictionary mapping Symbol → Series for successfully loaded instruments.
result.feature_sets Dictionary mapping Symbol → FeatureSet containing the engineered features.
result.ok Number of instruments successfully loaded and featurized.
result.failed Number of instruments that failed during loading or feature computation.
result.skipped Number of skipped instruments (missing or unavailable data).

Note: By default (update_globals=True), the loaded data is also mirrored into amquant.RAW_SERIES and amquant.FEATURE_SETS for interactive exploration in a Python REPL or Jupyter notebook. For production code, using result.raw_series and result.feature_sets is recommended.

Contributing & Collaboration

AMQuant is an open-source project and welcomes contributions from developers, quantitative researchers, and Python enthusiasts.

Getting Started

1. Fork the repository

Create your own fork of the AMQuant repository, then clone it locally:

git clone https://github.com/rayenamer/AmQuant
cd amquant

2. create a virtual environment

python3 -m venv venv

source venv/bin/activate

3. install development dependencies

python -m pip install --upgrade pip

pip install -e ".[dev]"

4. Write some good code (please keep the AI slop away)

The Vision Behind AMQuant

AMQuant is designed as the data-engineering foundation of a quantitative research stack.

Metadata

Release files for amquant 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for amquant 1.0.0
File Size Uploaded Provenance Actions
amquant-1.0.0.tar.gz 4.3 kB With provenance Details for amquant-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for amquant 1.0.0
File Interpreter ABI Platform Actions
amquant-1.0.0-py3-none-any.whl Python 3 none any Details for amquant-1.0.0-py3-none-any.whl

Total release size: 8.9 kB

Release files / amquant-1.0.0.tar.gz

Download URL amquant-1.0.0.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c209a923881a6deba7809bcf5459d2cc907fbc083aa1000ea4ba6f2fbddc1c4d
BLAKE2b-256 checksum
How to use checksums
225777544199a28cfafdcee8325450813fe3b8e03e6bcdfa9a2ff2421f96c4de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 30, 2026.

Transparency log

Release files / amquant-1.0.0-py3-none-any.whl

Download URL amquant-1.0.0-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fa0dbf60afd205f127c556288c6df2fe0a7499ffe08e7bfa60e628a1a675e32c
BLAKE2b-256 checksum
How to use checksums
21abbd2c06cbe9e44b4ac9f4162a4663d463d44d5e5bba4cf589682554c37959
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 30, 2026.

Transparency log

Security for amquant 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for amquant-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page