# ca-manmohan/heston-0930-option-buyer architecture

> Architecture diagram of the GitHub repository ca-manmohan/heston-0930-option-buyer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ca-manmohan/heston-0930-option-buyer
- Repository: https://github.com/ca-manmohan/heston-0930-option-buyer

## Overview

This repository describes a NIFTY 50 weekly ATM-options strategy that evaluates causal 09:30 telemetry, chooses a CE/PE trade or stands aside, and manages position sizing and exits through 11:30. The research script builds historical features and the backtest evaluates symbolic rules and simulated trades. The README also documents a GPU actor–critic discovery workflow, but no implementation for it appears in the supplied source tree, so it is represented only as a documented capability. Backtest data wiring beyond the shown code is not inferred.

Main entry points: [`strategy_eas_heston_0930.py`](https://github.com/ca-manmohan/heston-0930-option-buyer/blob/main/strategy_eas_heston_0930.py) (Trade gate), [`research_heston_stress_persistence_strategy.py`](https://github.com/ca-manmohan/heston-0930-option-buyer/blob/main/research_heston_stress_persistence_strategy.py) (Session features), [`backtest_heston_stress_persistence_20k.py`](https://github.com/ca-manmohan/heston-0930-option-buyer/blob/main/backtest_heston_stress_persistence_20k.py) (Rule evaluation), [`symbolic_heston_0930_invariant.py`](https://github.com/ca-manmohan/heston-0930-option-buyer/blob/main/symbolic_heston_0930_invariant.py) (Symbolic invariant)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_research["Research"]
  node_dataset["Session features"]
  node_calibration["Heston calibration"]
end

subgraph group_signals["Signal and Execution"]
  node_invariant["Symbolic invariant"]
  node_engine["Trade gate"]
  node_sizing["Position sizing"]
  node_exit["Tranche exits"]
end

subgraph group_validation["Backtest"]
  node_candidate["Rule evaluation"]
  node_backtest["Capital backtest"]
  node_gpu["GPU actor–critic"]
end

node_market(("NSE telemetry"))

node_market -->|"supplies telemetry"| node_dataset
node_dataset -->|"calibrates slices"| node_calibration
node_engine -->|"evaluates signal"| node_invariant
node_engine -->|"sizes position"| node_sizing
node_engine -->|"simulates exits"| node_exit
node_candidate -->|"scores candidates"| node_backtest
node_gpu -.->|"discovers rules"| node_candidate

click node_dataset "https://github.com/ca-manmohan/heston-0930-option-buyer/blob/main/research_heston_stress_persistence_strategy.py"
click node_calibration "https://github.com/ca-manmohan/heston-0930-option-buyer/blob/main/research_heston_stress_persistence_strategy.py"
click node_invariant "https://github.com/ca-manmohan/heston-0930-option-buyer/blob/main/symbolic_heston_0930_invariant.py"
click node_engine "https://github.com/ca-manmohan/heston-0930-option-buyer/blob/main/strategy_eas_heston_0930.py"
click node_sizing "https://github.com/ca-manmohan/heston-0930-option-buyer/blob/main/strategy_eas_heston_0930.py"
click node_exit "https://github.com/ca-manmohan/heston-0930-option-buyer/blob/main/strategy_eas_heston_0930.py"
click node_candidate "https://github.com/ca-manmohan/heston-0930-option-buyer/blob/main/backtest_heston_stress_persistence_20k.py"
click node_backtest "https://github.com/ca-manmohan/heston-0930-option-buyer/blob/main/backtest_heston_stress_persistence_20k.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_dataset,node_calibration toneBlue
class node_invariant,node_engine,node_sizing,node_exit toneAmber
class node_candidate,node_backtest,node_gpu toneMint
class node_market toneIndigo
```

## Components

### Research

- [Session features](https://github.com/ca-manmohan/heston-0930-option-buyer/blob/main/research_heston_stress_persistence_strategy.py): `research_heston_stress_persistence_strategy.py`
- [Heston calibration](https://github.com/ca-manmohan/heston-0930-option-buyer/blob/main/research_heston_stress_persistence_strategy.py): `research_heston_stress_persistence_strategy.py`

### Signal and Execution

- [Symbolic invariant](https://github.com/ca-manmohan/heston-0930-option-buyer/blob/main/symbolic_heston_0930_invariant.py): `symbolic_heston_0930_invariant.py`
- [Trade gate](https://github.com/ca-manmohan/heston-0930-option-buyer/blob/main/strategy_eas_heston_0930.py): `strategy_eas_heston_0930.py`
- [Position sizing](https://github.com/ca-manmohan/heston-0930-option-buyer/blob/main/strategy_eas_heston_0930.py): `strategy_eas_heston_0930.py`
- [Tranche exits](https://github.com/ca-manmohan/heston-0930-option-buyer/blob/main/strategy_eas_heston_0930.py): `strategy_eas_heston_0930.py`

### Backtest

- [Rule evaluation](https://github.com/ca-manmohan/heston-0930-option-buyer/blob/main/backtest_heston_stress_persistence_20k.py): `backtest_heston_stress_persistence_20k.py`
- [Capital backtest](https://github.com/ca-manmohan/heston-0930-option-buyer/blob/main/backtest_heston_stress_persistence_20k.py): `backtest_heston_stress_persistence_20k.py`
- **GPU actor–critic**

### Other components

- **NSE telemetry**

## Connections

- NSE telemetry → Session features: supplies telemetry (evidence: `README.md`)
- Session features → Heston calibration: calibrates slices (evidence: `research_heston_stress_persistence_strategy.py`)
- Trade gate → Symbolic invariant: evaluates signal (evidence: `strategy_eas_heston_0930.py`)
- Trade gate → Position sizing: sizes position (evidence: `strategy_eas_heston_0930.py`)
- Trade gate → Tranche exits: simulates exits (evidence: `strategy_eas_heston_0930.py`)
- Rule evaluation → Capital backtest: scores candidates (evidence: `backtest_heston_stress_persistence_20k.py`)
- GPU actor–critic → Rule evaluation: discovers rules (evidence: `README.md`)
