A lightweight library for loading market data and computing engineered features.
Project description
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"]
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 intoamquant.RAW_SERIESandamquant.FEATURE_SETSfor interactive exploration in a Python REPL or Jupyter notebook. For production code, usingresult.raw_seriesandresult.feature_setsis 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file amquant-0.1.2.tar.gz.
File metadata
- Download URL: amquant-0.1.2.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
900538684cd0be1380dd4b2bf98fdaf8c037f2a82ebfd88a652e7ccc61d6b293
|
|
| MD5 |
32be330acb444236d80e60c0b27f56da
|
|
| BLAKE2b-256 |
5b46ceeeb45f6aaacceefa73755186ee90378f00d85467b485c4db52845e3192
|
Provenance
The following attestation bundles were made for amquant-0.1.2.tar.gz:
Publisher:
publish.yaml on rayenamer/AmQuant
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
amquant-0.1.2.tar.gz -
Subject digest:
900538684cd0be1380dd4b2bf98fdaf8c037f2a82ebfd88a652e7ccc61d6b293 - Sigstore transparency entry: 2189883232
- Sigstore integration time:
-
Permalink:
rayenamer/AmQuant@9c90888e150a24a1805ba7808959084563787260 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/rayenamer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@9c90888e150a24a1805ba7808959084563787260 -
Trigger Event:
push
-
Statement type:
File details
Details for the file amquant-0.1.2-py3-none-any.whl.
File metadata
- Download URL: amquant-0.1.2-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1cfd0e709169e4160c57e6735d78cfcd64955699346996260e7357952912b39
|
|
| MD5 |
5378279e834f14bf541f7c0fff3f4371
|
|
| BLAKE2b-256 |
1956d2afcc26f88fb84f79af3b40c3a4f131e8b0fdd5c93a6945ce3ac69b2eda
|
Provenance
The following attestation bundles were made for amquant-0.1.2-py3-none-any.whl:
Publisher:
publish.yaml on rayenamer/AmQuant
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
amquant-0.1.2-py3-none-any.whl -
Subject digest:
e1cfd0e709169e4160c57e6735d78cfcd64955699346996260e7357952912b39 - Sigstore transparency entry: 2189883279
- Sigstore integration time:
-
Permalink:
rayenamer/AmQuant@9c90888e150a24a1805ba7808959084563787260 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/rayenamer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@9c90888e150a24a1805ba7808959084563787260 -
Trigger Event:
push
-
Statement type: