Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TPAAM — Thematic Probabilistic Asymmetry Allocation Model

Version: 3.0 | Status: Live validation — Phase 4 Author: Rahul Sai | Started: May 2026


What This Is

TPAAM is a regime-aware probabilistic capital allocation framework. Central hypothesis: which theory of markets is valid right now is itself regime-dependent. Six regimes (Expansion / Contraction / Mania / Panic / Transition / Innovation) each assign different epistemic authority to six scoring factors (Q/V/N/A/P/T).

Current status: Behavioral discipline layer empirically validated in live trading. Mathematical parameter layer in active validation. Whether specific weights add edge beyond the behavioral layer alone is an open and formally unresolved question.


Architecture

Layer 1  — Market Regime Detection (probabilistic, non-exclusive)

↓ MMAC: posterior blending, not hard-switch

Layer 2  — Theme Discovery

Layer 3  — Probabilistic Asymmetry Engine

Layer 4  — Multi-Factor Scoring (Q / V / N / A / P / T)

Layer 5  — Dynamic Weighting (regime-conditional)

Layer 6  — Position Sizing

Layer 7  — Portfolio Construction

Layer 8  — Feedback Loop

MMAC Layer — Adaptive Belief Blending

Normalises regime scores into a posterior and blends all six weight vectors proportionally. A barely-dominant regime produces cautious blended weighting. Missing input data pulls toward uniform (maximum uncertainty) and raises a degraded-confidence flag — never silently substituted.

Formal analogue: Bayesian Model Averaging over regime hypotheses.

Layer 3 — Asymmetry Engine

AsymmetryRatio = (P_up × M_up) / (P_down × M_down)

2.0  investment minimum
3.0  tactical trade minimum
4.0  aggressive allocation eligible

Layer 5 — Regime-Conditional Weights

Regime Q V N A P T
EXPANSION 0.35 0.25 0.15 0.10 0.10 0.05
CONTRACTION 0.35 0.20 0.05 0.10 0.15 0.15
MANIA 0.10 0.05 0.40 0.25 0.15 0.05
PANIC 0.40 0.10 0.05 0.20 0.20 0.05
TRANSITION 0.20 0.15 0.15 0.20 0.15 0.15
INNOVATION 0.10 0.05 0.35 0.30 0.10 0.10

Weights are hand-set priors, not estimated from data. Whether they outperform equal-weight is what the Part 6 three-arm backtest tests.


Validation Program

Track Count Win Rate Status
FTMO demo 22/30 ~64% 8 trades to milestone
Crypto (clean Cat A) 22 63.6% Gate-conditional

Validated findings:

  • HTF alignment = Y: ~80-83% win rate
  • HTF = N: 0% win rate across clean sample
  • Override rate: 0% wins in pre-override clean sample

Open question: Whether the specific quantitative weights add edge beyond the behavioral discipline layer alone. Pre-registered three-arm test (TPAAM vs equal-weight vs MMAC blend) will answer this.


Known Deficiencies (explicit)

  • PANIC over-detection bias: 38.3% on GBM null test
  • INNOVATION detection gap: 0.0% on null test
  • US-centricity in regime proxies
  • Weight matrices are unvalidated priors

Planned Extensions (post-validation)

Entropy Haircut: Shannon entropy of MMAC posterior scales position size down as regime uncertainty rises.

IMM Transition Layer: Interacting Multiple Model filter adds regime transition prior. Stepping stone toward a learned HMM. Directly attacks the PANIC detection bias.


Stack

Python 3 | yfinance | Alpha Vantage | AngelOne SmartAPI


Design Principle

"The system should never be more certain than the evidence warrants."

The framework is built to be falsifiable. Parameters are logged. Open questions are documented. Things that don't work are recorded alongside things that do.


Nothing here is financial advice. This is a research and validation project.

About

8-layer regime-aware probabilistic allocation framework. Live validation in progress — 22/30 FTMO trades, 63.6% win rate on process-compliant entries. Mathematical edge question formally open.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages