Skip to content

Commit 5757976

Browse files
updated docs
1 parent b5dd106 commit 5757976

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+158
-107
lines changed

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,31 @@ Simulates asset returns (lognormal), builds portfolio frame, computes efficient
151151
npm run efficient-frontier -- --simulations 3000 --points 25 --no-open
152152
```
153153

154+
### Compare Metrics Script
155+
156+
Compares TypeScript openseries-ts metrics against Python openseries metrics. Loads timeseries data from `iris.json`, computes metrics with the TS implementation, and displays them side-by-side with Python metrics from `data.json`.
157+
158+
**Prerequisites:** Run the Python script first to create the reference data in `~/Documents/`:
159+
160+
```bash
161+
python scripts/load_py_openseries_data.py
162+
```
163+
164+
This fetches the Captor Iris Bond timeseries from the API, saves it to `~/Documents/iris.json`, and exports Python-calculated metrics to `~/Documents/data.json`.
165+
166+
| Command | Description |
167+
|---------|-------------|
168+
| `npm run compare-metrics` | Compare TS vs Python metrics (default: 4 decimal places) |
169+
170+
**Options:** `--decimals=N` (pass after `--`), or `COMPARE_DECIMALS=N` env var (avoids npm `--` when using npm run).
171+
172+
**Examples:**
173+
```bash
174+
npm run compare-metrics
175+
npm run compare-metrics -- --decimals=6
176+
COMPARE_DECIMALS=2 npm run compare-metrics
177+
```
178+
154179
## License
155180

156181
BSD-3-Clause

docs/classes/DateAlignmentError.html

Lines changed: 5 additions & 5 deletions
Large diffs are not rendered by default.

docs/classes/IncorrectArgumentComboError.html

Lines changed: 5 additions & 5 deletions
Large diffs are not rendered by default.

docs/classes/InitialValueZeroError.html

Lines changed: 5 additions & 5 deletions
Large diffs are not rendered by default.

docs/classes/MixedValuetypesError.html

Lines changed: 5 additions & 5 deletions
Large diffs are not rendered by default.

docs/classes/NoWeightsError.html

Lines changed: 5 additions & 5 deletions
Large diffs are not rendered by default.

docs/classes/OpenFrame.html

Lines changed: 8 additions & 8 deletions
Large diffs are not rendered by default.

docs/classes/OpenTimeSeries.html

Lines changed: 9 additions & 9 deletions
Large diffs are not rendered by default.

docs/classes/ResampleDataLossError.html

Lines changed: 5 additions & 5 deletions
Large diffs are not rendered by default.

docs/classes/ReturnSimulation.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)