ATR Quant ML


A quantitative machine learning research framework for algorithmic
trading, combining financial feature engineering, recurrent neural
networks, walk-forward validation, realistic backtesting and
statistical robustness analysis.
The framework includes a versioned, read-only REST API
for accessing archived scientific research results.
Developed as part of the AlgoTradingResearch ecosystem.
Why ATR Quant ML?
Predictive accuracy alone does not establish a profitable
trading strategy.
Financial machine learning models must be evaluated against
transaction costs, market exposure, passive alternatives,
statistical uncertainty and realistic execution assumptions.
ATR Quant ML provides a reproducible research environment
designed to investigate these challenges.
The objective is not to maximize historical backtest performance,
but to determine whether a predictive model provides a measurable
and statistically defensible economic advantage.
Features
Machine Learning
- Financial time-series feature engineering
- Multi-horizon return and volatility features
- Relative volume normalization
- LSTM neural networks implemented in PyTorch
- Compact recurrent neural network architectures
- Configurable research experiments
- Purged walk-forward validation
- Reserved final holdout
Backtesting
- Long-only and configurable directional strategies
- Probability-based trading signals
- Transaction commissions and slippage
- Position and exposure analytics
- Portfolio equity curves
- Drawdown analysis
- Turnover measurement
- Passive benchmark comparison
Risk Analytics
- Compound annual growth rate (CAGR)
- Annualized volatility
- Sharpe ratio
- Sortino ratio
- Calmar ratio
- Maximum drawdown
- Profit factor
- Regression alpha and beta
Statistical Research
- Paired moving block bootstrap
- Stationary bootstrap
- Percentile confidence intervals
- Approximate centered bootstrap hypothesis tests
- Holm multiple-testing adjustment
- Transaction cost sensitivity analysis
- Cross-experiment data integrity validation
- Parallel research execution
- Reproducible research archives
Research API
- Versioned REST API implemented with FastAPI.
- Explicit research experiment registry.
- Paginated access to archived scientific datasets.
- Economic metrics and statistical inference endpoints.
- Original research PNG chart delivery.
- SHA-256 resource integrity verification.
- OpenAPI 3.1 machine-readable contract.
- Swagger UI and ReDoc documentation.
- Python HTTPX integration client.
- Localhost-oriented, read-only research architecture.
Installation
Clone the repository:
git clone https://github.com/fredp74/atr-quant-ml.git
cd atr-quant-ml
Create a Python virtual environment:
python -m venv .venv
Activate the environment on Windows using Git Bash:
source .venv/Scripts/activate
On Linux or macOS:
source .venv/bin/activate
Install the project:
python -m pip install --upgrade pip
python -m pip install -e .
Check the environment:
python -m pip check
Quickstart
Run the automated test suite:
python -m pytest -q
Run the transaction cost sensitivity research:
python scripts/analyze_transaction_costs.py
Run the statistical robustness smoke profile:
python scripts/analyze_statistical_robustness.py --profile smoke
Run the complete statistical research profile:
python scripts/analyze_statistical_robustness.py \
--profile full \
--workers 4 \
--batch-size 128
Generate the statistical research dashboard:
python scripts/plot_statistical_robustness.py
Research scripts require the corresponding upstream experiment
and backtesting artifacts to be available locally.
Archived research results are available under docs/research/
without rerunning the complete training pipeline.
Research API Quickstart
Install the tested API dependencies:
python -m pip install -r requirements-api.txt
python -m pip check
Start the local research service from the repository root:
python -m uvicorn atr_quant_ml.api.app:create_app --factory --host 127.0.0.1 --port 8000
Open the interactive documentation:
With the server running, execute the integration example
from a second terminal with the virtual environment activated:
python docs/api/examples.py
See the complete Research API Integration Guide.
Pipeline Overview
flowchart TD
A[Historical Market Data] --> B[Financial Feature Engineering]
B --> C[Purged Walk-Forward Validation]
C --> D[LSTM Training]
D --> E[Out-of-Sample Probabilities]
E --> F[Trading Signal Generation]
F --> G[Execution and Backtesting]
G --> H[Risk Analytics]
G --> I[Passive Benchmarks]
H --> J[Transaction Cost Sensitivity]
I --> J
J --> K[Statistical Robustness]
K --> L[Research Reports]
EXP007 evaluates a reserved historical holdout after freezing
the research protocol, model and allocation strategy.
This is not prospective validation.
Market Data
The initial research program investigates the S&P 500
using historical daily financial data.
| Component |
Description |
| Prediction universe |
S&P 500 index |
| Execution instrument |
SPDR S&P 500 ETF (SPY) |
| Frequency |
Daily |
| Prediction horizon |
21 trading sessions |
| Initial feature set |
69 financial features |
| Backtest evaluation period |
1993-02-01 to 2022-03-11 |
| Backtest observations |
7,332 |
| Reference transaction costs |
7 basis points |
The initial feature engineering methodology is inspired by
academic research into LSTM-based stock market prediction.
Subsequent experiments investigate stationary volume features
and more compact neural network architectures.
Research Experiments
| Experiment |
Model |
Description |
| EXP001 |
Stanford LSTM |
Initial multi-horizon financial features |
| EXP002 |
Relative Volume LSTM |
Relative volume feature normalization |
| EXP003 |
Compact LSTM |
Reduced recurrent model complexity |
| EXP004 |
Signal Optimization |
Walk-forward execution policy selection |
| EXP005 |
Market Regime Analysis |
Conditional predictive and economic research |
| EXP006 |
Portfolio Allocation |
Adaptive walk-forward market allocation |
| EXP007 |
Final Holdout |
Frozen model and regime allocation evaluation |
| Metric |
EXP001 |
EXP002 |
EXP003 |
| Accuracy |
56.76% |
60.90% |
62.17% |
| Balanced accuracy |
49.20% |
48.56% |
49.77% |
| ROC AUC |
0.5150 |
0.5173 |
0.5146 |
| Brier score |
0.2532 |
0.2364 |
0.2340 |
| Log loss |
0.7010 |
0.6658 |
0.6609 |
The observed predictive performance remains weak.
Classification accuracy should be interpreted alongside
class imbalance, probability calibration and economic results.
Historical backtesting results at the reference transaction
cost of 7 basis points:
| Metric |
EXP001 |
EXP002 |
EXP003 |
| CAGR |
3.40% |
4.07% |
3.91% |
| Annualized volatility |
10.92% |
14.01% |
9.66% |
| Sharpe ratio |
0.3611 |
0.3551 |
0.4458 |
| Sortino ratio |
0.5069 |
0.4889 |
0.6143 |
| Calmar ratio |
0.1025 |
0.0902 |
0.1589 |
| Maximum drawdown |
-33.20% |
-45.14% |
-24.62% |
| Profit factor |
1.105 |
1.095 |
1.135 |
| Average exposure |
43.64% |
60.28% |
42.23% |
| Cumulative turnover |
44 |
72 |
252 |
EXP003 exhibits the strongest observed risk-adjusted performance
among the three LSTM experiments.
However, this does not establish superiority over passive
investment alternatives.
Passive Benchmarks
EXP003 compared with passive allocation strategies:
| Strategy |
CAGR |
Sharpe ratio |
Max drawdown |
| EXP003 Compact LSTM |
3.91% |
0.4458 |
-24.62% |
| Buy & Hold |
10.09% |
0.6095 |
-55.42% |
| Exposure Matched |
4.55% |
0.6052 |
-27.21% |
| Volatility Matched |
5.53% |
0.6059 |
-32.61% |
Exposure-matched and volatility-matched benchmarks are
constructed ex post for research diagnostics.
They are not independent, prospectively selected investment
strategies.
Transaction Cost Sensitivity
EXP003 remains sensitive to execution costs because of its
relatively high turnover.
| Total transaction cost |
Final capital |
| 0 bps |
$364,231 |
| 7 bps |
$305,309 |
| 20 bps |
$219,924 |
| 50 bps |
$102,990 |
| 100 bps |
$28,936 |
Initial capital: $100,000.
Reducing turnover is a priority for subsequent research.
However, transaction cost reduction alone does not establish
a profitable predictive advantage.
See the complete
Transaction Cost Sensitivity Report.
Statistical Robustness
BUILD 010 introduces a paired block bootstrap framework
for evaluating uncertainty in historical strategy performance.
| Research parameter |
Value |
| Experiments |
3 |
| Benchmarks per experiment |
3 |
| Validated return series |
12 |
| Bootstrap methods |
2 |
| Block lengths |
21, 63, 126 |
| Research configurations |
54 |
| Replications per configuration |
10,000 |
| Total comparison replications |
540,000 |
| Confidence level |
95% |
| Statistical summary rows |
270 |
| Hypothesis tests |
162 |
| Invalid statistic replications |
0 |
| Significant findings after Holm |
0 |
Holm adjustment is applied separately to three families
of 54 hypotheses:
- CAGR difference
- Sharpe ratio difference
- Annualized regression alpha
The bootstrap configurations are dependent and do not
represent independent validation experiments.
EXP003 Statistical Dashboard

EXP003 exhibits an estimated annualized regression alpha
of approximately +1.26% against Buy & Hold.
The corresponding marginal 95% bootstrap confidence
interval is approximately:
[-1.95%, +4.17%]
The estimate is statistically inconclusive.
No statistically significant trading advantage has been
demonstrated after the selected multiple-testing adjustment.
Research Archives
Archived research files include SHA-256 checksums
for integrity verification.
Walk-Forward Signal Optimization — EXP004
BUILD 011 extends ATR Quant ML with a modular signal
engineering and walk-forward policy optimization framework.
The predictive LSTM model remains unchanged. Research focuses
on improving signal execution, trading persistence and
portfolio behavior.
Signal Engineering
- Configurable entry and exit thresholds.
- Hysteresis-based signal generation.
- Entry and exit confirmation.
- Minimum holding period constraints.
- Continuous portfolio state across validation folds.
- Expanding-window policy selection.
- Transaction-cost-aware execution.
- Ex-post and ex-ante passive allocation benchmarks.
EXP004 Research Design
| Parameter |
Value |
| Historical observations |
7,332 |
| Paired validation observations |
6,824 |
| Validation period |
1995-2022 |
| Validation folds |
4 |
| Candidate policies |
384 |
| Calibration evaluations |
1,536 |
| Transaction costs |
7 bps |
| Model retraining |
No |
| Final holdout used |
No |
Selected Signal Policy
The same candidate was selected across all four expanding
calibration windows.
| Parameter |
Value |
| Candidate ID |
143 |
| Entry threshold |
0.60 |
| Separate exit threshold |
None |
| Entry confirmation |
2 sessions |
| Exit confirmation |
2 sessions |
| Minimum holding period |
21 sessions |
| Eligible evaluations |
37 |
| Fallbacks |
0 |
Repeated selection indicates historical policy stability,
but overlapping calibration windows do not constitute
independent confirmations.
The following results compare EXP003 and EXP004 over the
same 6,824 validation observations.
| Metric |
EXP003 |
EXP004 |
| Initial capital |
$100,000 |
$100,000 |
| Final equity |
$312,321 |
$456,537 |
| CAGR |
4.30% |
5.77% |
| Annualized volatility |
9.90% |
11.28% |
| Sharpe ratio |
0.4746 |
0.5537 |
| Sortino ratio |
0.6542 |
0.7798 |
| Calmar ratio |
0.1745 |
0.2411 |
| Maximum drawdown |
-24.62% |
-23.92% |
| Cumulative turnover |
214 |
114 |
| Market exposure |
43.17% |
49.56% |
EXP004 improves historical CAGR by 1.47 percentage points
and reduces cumulative turnover by 46.73%.
The 50% turnover reduction target was not achieved during
validation. Market exposure and annualized volatility
increased.
Passive Benchmark Comparison
| Strategy |
CAGR |
Sharpe |
| Buy & Hold SPY |
10.34% |
0.6107 |
| Passive 75% |
8.00% |
0.6089 |
| Volatility Matched Ex Post |
6.41% |
0.6077 |
| EXP004 Optimized |
5.77% |
0.5537 |
| Passive 50% |
5.49% |
0.6070 |
| Exposure Matched Ex Post |
5.44% |
0.6070 |
| Walk-Forward Exposure Ex Ante |
4.47% |
0.6334 |
| EXP003 Baseline |
4.30% |
0.4746 |
| Passive 25% |
2.82% |
0.6051 |
EXP004 exceeds the exposure-matched benchmark by
approximately 0.32 percentage points of annualized return.
However, all seven passive benchmarks exhibit higher
historical Sharpe ratios.
Ex-post matching uses realized validation information.
The ex-ante benchmark uses calibration-only exposure
estimates and does not exactly match realized exposure.
Statistical Robustness
| Parameter |
Result |
| Bootstrap methods |
2 |
| Block lengths |
21 / 63 / 126 |
| Benchmark comparisons |
8 |
| Bootstrap configurations |
48 |
| Paired bootstrap replications |
480,000 |
| Statistical summaries |
240 |
| Hypothesis tests |
144 |
| Significant adjusted hypotheses |
0 |
| Invalid statistic replications |
0 |
No statistically significant outperformance is established
after Holm multiple-testing correction, applied separately
to each family of 48 hypotheses (CAGR, Sharpe and alpha).
The procedure does not provide global 5% family-wise
error control across all three metric families.
Bootstrap inference is conditional on archived strategy
returns and does not repeat predictive model training
or policy selection.
EXP004 remains exploratory research. The final holdout
has not been accessed.
EXP004 Executive Research Dashboard

Research Documentation
Software Validation
BUILD 011 passed 525 automated tests, dependency integrity
checks and source compilation checks.
Market Regime Analysis - EXP005
BUILD 012 extends ATR Quant ML with a reproducible
market regime research framework.
Research Capabilities
- Causal market index reconstruction.
- Trend, volatility and drawdown classification.
- Composite market regime analysis.
- Regime transitions and episode duration.
- Conditional predictive and calibration diagnostics.
- Economic performance and benchmark attribution.
- Regime-conditioned paired block bootstrap.
- Leave-one-fold-out stability analysis.
- Reproducible research dashboards.
Research Results
| Parameter |
Result |
| Historical validation observations |
6,824 |
| Validation folds |
4 |
| Observed composite regimes |
26 |
| Eligible regimes |
22 |
| Economic strategies |
9 |
| LSTM pooled ROC AUC |
0.535094 |
| LSTM within-fold ROC AUC |
0.525701 |
| Global Brier Skill Score |
-0.60% |
| Bootstrap trajectories |
300,000 |
| Statistical evaluations |
3,168 |
| Primary hypotheses |
528 |
| Primary testable hypotheses |
415 |
| Primary non-testable hypotheses |
113 |
| Significant adjusted hypotheses |
0 |
| Research charts |
24 |
| Final holdout used |
No |
| Strategy |
Sharpe ratio |
| Walk-forward ex ante |
0.6334 |
| Buy & Hold |
0.6107 |
| EXP004 optimized |
0.5537 |
| EXP003 baseline |
0.4746 |
Historical performance varies across market regimes.
However, no statistically significant outperformance
has been demonstrated after Holm correction.
The exploratory bear / medium-volatility / stress
regime exhibits promising historical results, but
all invested observations are concentrated in a
single validation fold.
These results do not constitute independent confirmation.
EXP005 Executive Research Dashboard

Research Documentation
Walk-Forward Portfolio Allocation - EXP006
BUILD 013 introduces dynamic long-only portfolio allocation
and chronological candidate selection.
Research Capabilities
- Continuous and discrete probability allocation.
- Causal volatility targeting.
- Trend-regime portfolio allocation.
- Combined probability and volatility allocation.
- Expanding-window adaptive candidate selection.
- Continuous portfolio execution across validation folds.
- Paired portfolio bootstrap inference.
- Leave-one-fold-out stability diagnostics.
Research Design
| Parameter |
Result |
| Historical observations |
7,332 |
| Validation observations |
6,824 |
| Validation folds |
4 |
| Allocation candidates |
21 |
| Calibration evaluations |
84 |
| Economic portfolios |
26 |
| Transaction costs |
7 bps |
| Model retraining |
No |
| Final holdout used |
No |
| Metric |
A06 Adaptive |
Buy & Hold |
| Initial capital |
$100,000 |
$100,000 |
| Final equity |
$694,511 |
$1,436,667 |
| CAGR |
7.42% |
10.34% |
| Annualized volatility |
11.07% |
19.12% |
| Sharpe ratio |
0.7020 |
0.6107 |
| Maximum drawdown |
-30.78% |
-55.42% |
| Average exposure |
70.96% |
100.00% |
The adaptive portfolio improves observed Sharpe relative
to EXP003, EXP004 and the archived passive benchmarks.
However, Buy & Hold retains a higher historical CAGR.
Three of four validation folds select trend-regime
allocation rather than probability-based allocation.
Statistical Robustness
| Parameter |
Result |
| Bootstrap configurations |
6 |
| Replications per configuration |
50,000 |
| Bootstrap trajectories |
300,000 |
| Statistical evaluations |
162 |
| Primary hypotheses |
27 |
| Significant primary hypotheses |
2 |
| Significant evaluations across configurations |
12 |
| Inconclusive evaluations |
150 |
| Untestable evaluations |
0 |
| Significant Sharpe improvements |
0 |
| Leave-one-fold-out signs preserved |
95/108 |
The same two return hypotheses against Passive 25%
are significant after Holm correction in all six
bootstrap configurations.
These findings are mathematically related and do not
represent independent confirmations.
A06 has substantially higher market exposure than
Passive 25%. Return superiority does not establish alpha.
No statistically significant Sharpe improvement or
incremental LSTM-specific advantage has been established.
EXP006 remains exploratory historical research.
EXP006 Executive Research Dashboard

Research Documentation
Reserved Historical Holdout Validation - EXP007
BUILD 014 evaluates a frozen predictive model and portfolio
allocation strategy on a reserved historical holdout.
Research Design
| Parameter |
Result |
| Holdout start boundary |
2022-05-01 |
| First prediction |
2022-05-02 |
| Final observed session |
2026-11-25 |
| Prediction observations |
1,148 |
| Matured prediction labels |
1,127 |
| Economic observations |
1,146 |
| Economic portfolios |
8 |
| Transaction costs |
7 bps |
| Allocation candidates |
21 |
| Frozen candidate |
A04_balanced |
| Holdout model retraining |
No |
| Holdout strategy reselection |
No |
The protocol, model and allocation selection were frozen
before the final holdout evaluation.
A06 Frozen uses a trend-regime allocation selected once
from the archived development period.
| Market regime |
Allocation |
| Bull |
100% |
| Sideways |
50% |
| Bear |
25% |
| Unknown |
0% |
The selected allocation does not use LSTM probabilities.
| Model |
Accuracy |
Balanced accuracy |
ROC AUC |
Brier score |
| LSTM |
65.93% |
49.73% |
0.4602 |
0.2317 |
| Logistic regression |
65.04% |
53.39% |
0.5181 |
0.2287 |
| Historical probability |
66.28% |
50.00% |
0.5000 |
0.2252 |
| Majority class |
66.28% |
50.00% |
0.5000 |
0.3372 |
The LSTM does not demonstrate incremental predictive
value on this holdout.
| Metric |
A06 Frozen |
Buy & Hold |
| Initial capital |
$100,000 |
$100,000 |
| Final equity |
$162,131 |
$179,717 |
| CAGR |
11.21% |
13.76% |
| Annualized volatility |
11.62% |
16.98% |
| Sharpe ratio |
0.9726 |
0.8443 |
| Sortino ratio |
1.3564 |
1.2200 |
| Maximum drawdown |
-10.48% |
-19.77% |
| Average exposure |
83.66% |
100.00% |
A06 Frozen improves observed Sharpe by approximately 15.19%
relative to Buy & Hold, while reducing annualized volatility
and maximum drawdown depth.
Buy & Hold retains a higher annualized return.
Benchmark Comparison
| Strategy |
CAGR |
Sharpe ratio |
| EXP003 baseline |
-0.77% |
0.0068 |
| EXP004 |
7.24% |
0.5562 |
| A06 Frozen |
11.21% |
0.9726 |
| Buy & Hold |
13.76% |
0.8443 |
| Passive 25% |
3.53% |
0.8385 |
| Passive 50% |
7.01% |
0.8405 |
| Passive 75% |
10.42% |
0.8424 |
| Development Exposure Matched |
10.90% |
0.8427 |
Statistical Robustness
| Parameter |
Result |
| Bootstrap method |
Stationary |
| Mean block length |
63 sessions |
| Paired bootstrap replications |
50,000 |
| Primary hypotheses |
7 |
| Testable hypotheses |
7 |
| Invalid replications |
0 |
| Significant adjusted hypotheses |
1 |
| Primary objective achieved |
No |
| Benchmark |
Sharpe difference |
Holm p-value |
| EXP003 baseline |
+0.9658 |
0.022120 |
| EXP004 |
+0.4164 |
0.931301 |
| Buy & Hold |
+0.1283 |
1.000000 |
| Passive 25% |
+0.1341 |
1.000000 |
| Passive 50% |
+0.1321 |
1.000000 |
| Passive 75% |
+0.1302 |
1.000000 |
| Development Exposure Matched |
+0.1299 |
1.000000 |
Statistical superiority is established only against EXP003
under the specified bootstrap testing procedure.
The primary objective of demonstrating Sharpe superiority
over both Buy & Hold and the development exposure-matched
benchmark was not achieved.
Scientific Conclusion
The frozen regime-based allocation exhibits favorable
descriptive risk-adjusted performance.
However, statistically significant superiority over passive
benchmarks and incremental LSTM predictive value have not
been established.
EXP007 is a retrospectively reserved historical holdout,
not prospective validation. Original historical data
provenance has not been independently verified.
EXP007 Executive Research Dashboard

EXP007 Portfolio Equity Curves

Research Documentation
Research API and Integration - BUILD 015
BUILD 015 completes the original software development
roadmap with a read-only research integration layer.
The API exposes archived scientific results without
retraining models, recalculating experiments or modifying
historical research archives.
Research API Inventory
| Resource |
Inventory |
| API version |
v1 |
| Registered research experiments |
5 |
| Documented REST endpoints |
11 |
| CSV datasets |
33 |
| Dataset rows |
14,475 |
| Original PNG research charts |
67 |
| Registered JSON metadata resources |
12 |
| Archive manifest entries |
156 |
API Architecture
flowchart TD
A[Research Applications] --> B[FastAPI REST API]
B --> C[Request Validation and Security]
C --> D[Research Experiment Registry]
D --> E[Archive Repository]
E --> F[SHA-256 Integrity Verification]
F --> G[Frozen Research Archives]
The API requires no database.
Scientific results remain stored in their original
research archives.
Research Registry
| Experiment |
Research scope |
| EXP003-ROBUSTNESS |
Statistical robustness |
| EXP004 |
Signal optimization |
| EXP005 |
Market regime analysis |
| EXP006 |
Portfolio allocation |
| EXP007 |
Reserved historical holdout |
REST Endpoints
All documented endpoints use GET.
| Endpoint |
Description |
/health |
Application liveness |
/api/v1/version |
Service version |
/api/v1/experiments |
Research catalog |
/api/v1/experiments/{id} |
Experiment details |
/api/v1/experiments/{id}/datasets |
Dataset catalog |
/api/v1/experiments/{id}/datasets/{name} |
Paginated dataset |
/api/v1/experiments/{id}/metrics |
Economic metrics |
/api/v1/experiments/{id}/statistics |
Statistical results |
/api/v1/experiments/{id}/charts |
Chart catalog |
/api/v1/experiments/{id}/charts/{name} |
Original PNG chart |
/api/v1/experiments/{id}/integrity |
Archive integrity |
Python Integration
With the local research API running:
import httpx
with httpx.Client(
base_url="http://127.0.0.1:8000",
timeout=30,
trust_env=False,
) as client:
response = client.get(
"/api/v1/experiments/EXP007/metrics"
)
response.raise_for_status()
print(response.json())
The complete integration client supports experiment
discovery, dataset pagination, statistical results,
integrity reporting and PNG checksum verification.
Security and Scientific Integrity
The API uses explicit resource allowlists, path validation,
SHA-256 verification and sanitized error responses.
It is designed for local research integration and does not
provide authentication, TLS termination or rate limiting.
Public deployment requires a separate security review.
SHA-256 verification establishes consistency against local
manifests, not publisher authenticity or original data
provenance.
The legacy EXP003 robustness archive retains one uncovered
.gitattributes file.
The API does not provide live trading, order execution,
investment recommendations or prospective validation.
Software Quality
| Quality indicator |
Result |
| Historical regression tests passed |
1,173 |
| API tests passed |
838 |
| Global tests passed |
2,011 |
| HTTP integration tests passed |
44 |
| Security tests passed |
48 |
| Documentation tests passed |
46 |
| API statement coverage |
609/609 (100%) |
| API branch coverage |
136/136 (100%) |
| SHA-256 entries verified |
238/238 |
| Failed tests |
0 |
The final quality gate was executed on Windows with
Python 3.13.14.
All 33 datasets and 67 PNG charts were audited through
a running local Uvicorn server.
One symbolic link test was skipped and one dependency
deprecation warning remains.
Coverage applies to the API modules and does not
constitute a security certification.
Integration Documentation
Repository Structure
atr-quant-ml/
├── configs/
├── data/
├── docs/
│ ├── api/
│ │ ├── README.md
│ │ ├── examples.py
│ │ └── openapi.json
│ ├── protocols/
│ └── research/
│ ├── cost_sensitivity/
│ ├── data_integrity/
│ ├── statistical_robustness/
│ ├── signal_optimization/
│ ├── market_regimes/
│ ├── portfolio_allocation/
│ └── final_holdout/
├── examples/
├── notebooks/
├── scripts/
├── src/
│ └── atr_quant_ml/
│ ├── api/
│ ├── backtesting/
│ ├── risk/
│ └── regimes/
├── tests/
├── CHANGELOG.md
├── requirements-api.txt
├── pyproject.toml
└── README.md
The source package contains the reusable research engine.
Configuration files define research experiments.
Scripts orchestrate training, backtesting, statistical
analysis and report generation.
Research documentation preserves numerical results,
methodological decisions and reproducible visualizations.
Research Roadmap
| Build |
Research stage |
Status |
| 001-008 |
Core ML, LSTM, backtesting and benchmarks |
Completed |
| 009 |
Transaction Cost Sensitivity |
Completed |
| 010 |
Statistical Robustness and Block Bootstrap |
Completed |
| 011 |
Turnover Reduction and Signal Hysteresis |
Completed |
| 012 |
Market Regime Analysis |
Completed |
| 013 |
Walk-Forward Portfolio Allocation |
Completed |
| 014 |
Independent Final Holdout Validation |
Completed |
| 015 |
Research API and Integration |
Completed |
The original BUILD 001-015 software development roadmap
has been implemented and validated.
Software completion does not imply scientific validation
of a profitable trading strategy.
The final historical holdout has been evaluated.
Prospective validation remains outstanding.
Research Reproducibility
The framework emphasizes:
- Explicit experiment configurations
- Deterministic random seeds
- Chronological validation
- Paired statistical comparisons
- Input data integrity checks
- Source code fingerprints
- Archived numerical results
- SHA-256 research manifests
- Automated regression tests
Current Validation Status
| Quality indicator |
Result |
| Automated tests |
2,011 passed |
| API tests |
838 passed |
| API statement coverage |
100% |
| API branch coverage |
100% |
| API endpoints |
11 |
| Registered research datasets |
33 |
| Registered research charts |
67 |
| Final quality gate checksums |
238/238 |
| Dependency validation |
Passed |
| EXP005 bootstrap configurations |
6/6 |
| EXP005 archived research charts |
24 |
| EXP005 archive checksums |
41/41 |
| EXP006 bootstrap configurations |
6/6 |
| EXP006 archived research charts |
12 |
| EXP006 archive checksums |
36/36 |
| EXP007 bootstrap replications |
50,000 |
| EXP007 archived research charts |
12 |
| EXP007 archive checksums |
39/39 |
| EXP007 frozen implementation checksums |
74/74 |
| Final historical holdout |
Evaluated |
| Primary scientific objective |
Not achieved |
| Prospective validation |
Pending |
Reference research environment: NucBox M7, Windows,
Python and parallel NumPy-based statistical processing.
Full end-to-end reproduction requires the original
market data and upstream experiment artifacts.
Some historical implementation checksums reference
local artifacts not included in the repository.
The tested API dependency versions are not a complete
transitive dependency lock.
Known Limitations
- Financial markets are non-stationary.
- Historical relationships may not persist.
- Predictive accuracy does not imply trading profitability.
- Transaction costs may materially reduce returns.
- Historical backtests remain sensitive to model selection.
- Ex-post passive benchmark matching uses realized information.
- Bootstrap inference is conditional on historical returns.
- Bootstrap confidence intervals are not simultaneous.
- Multiple-testing control depends on the experiment’s defined hypothesis family.
- Model selection uncertainty is not fully captured.
- EXP007 is a retrospectively reserved historical holdout.
- Original historical data provenance is not independently verified.
- Prospective validation remains pending.
- Incremental LSTM predictive value is not established.
ATR Quant ML is an exploratory research framework,
not a validated production trading system.
License
ATR Quant ML is released under the MIT License.
See LICENSE for details.
Disclaimer
This software is provided for quantitative research and
educational purposes.
Nothing in this repository constitutes investment advice,
a recommendation to trade or a guarantee of future performance.
Historical and simulated results do not guarantee future results.
A research project by Algotradingresearch.com
评论