Skip to content

Commit e87b830

Browse files
docs update
1 parent 6905ddc commit e87b830

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

+288
-122
lines changed

README.md

Lines changed: 61 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -87,21 +87,68 @@ Docs will be available at `https://<username>.github.io/<repo>/`.
8787

8888
## Scripts
8989

90+
### Build & Development
91+
92+
| Command | Description |
93+
|---------|-------------|
94+
| `npm run build` | Build `dist/` (ESM + CJS + declarations) |
95+
| `npm run test` | Run Vitest test suite |
96+
| `npm run test:coverage` | Run tests with Istanbul coverage report |
97+
| `npm run lint` | Run ESLint on `src/` |
98+
| `npm run lint:fix` | ESLint with auto-fix |
99+
| `npm run typecheck` | TypeScript check (`tsc --noEmit`) |
100+
| `npm run check` | Run lint + typecheck |
101+
| `npm run docs` | Generate API docs to `docs/` (TypeDoc) |
102+
103+
### Report Script
104+
105+
Generates an HTML portfolio report from Captor API timeseries (cumulative performance, annual returns, statistics).
106+
107+
| Command | Description |
108+
|---------|-------------|
109+
| `npm run report` | Report with custom or default Captor series IDs |
110+
| `npm run report:iris` | Preset: Captor Iris Bond + Benchmark Index |
111+
| `npm run report:captor` | Same as `report` (default Captor IDs) |
112+
113+
**Options** (pass after `--`): `--ids id1 id2 ...`, `--iris`, `--title "Title"`, `--countries "SE,US"`, `--from-date YYYY-MM-DD`, `--to-date YYYY-MM-DD`, `--filename path`, `--no-open`, `--no-logo`.
114+
115+
**Examples:**
116+
```bash
117+
npm run report -- --ids 638f681e 5b72a10c 5c1115fb
118+
npm run report:iris -- --from-date 2023-01-01 --to-date 2024-12-31 --no-open
119+
```
120+
121+
### Plot Script
122+
123+
Generates a full-page HTML line chart of cumulative returns (100 base) from Captor API timeseries.
124+
125+
| Command | Description |
126+
|---------|-------------|
127+
| `npm run plot` | Plot with custom or default Captor series IDs |
128+
| `npm run plot:iris` | Preset: Captor Iris Bond + Benchmark Index |
129+
| `npm run plot:captor` | Same as `plot` |
130+
131+
**Options** (pass after `--`): same as Report (`--ids`, `--iris`, `--title`, `--countries`, `--from-date`, `--to-date`, `--filename`, `--no-open`, `--no-logo`).
132+
133+
**Examples:**
134+
```bash
135+
npm run plot:iris
136+
npm run plot -- --ids id1 id2 --no-open --filename my-plot.html
137+
```
138+
139+
### Efficient Frontier Script
140+
141+
Simulates asset returns (lognormal), builds portfolio frame, computes efficient frontier and max-Sharpe portfolio, and plots simulated portfolios, frontier, and labeled points (assets, current, optimum). Mirrors the Python openseries Jupyter notebook workflow.
142+
143+
| Command | Description |
144+
|---------|-------------|
145+
| `npm run efficient-frontier` | Run efficient frontier demo |
146+
147+
**Options** (pass after `--`): `--simulations N` (default: 5000), `--points N` (default: 30), `--seed N` (default: 71), `--countries "SE"`, `--title "Title"`, `--filename path`, `--no-open`, `--no-logo`.
148+
149+
**Example:**
90150
```bash
91-
npm run build # Build dist/
92-
npm run test # Run tests
93-
npm run test:coverage # Tests with coverage
94-
npm run lint # ESLint
95-
npm run lint:fix # ESLint with auto-fix
96-
npm run typecheck # TypeScript check
97-
npm run check # lint + typecheck
98-
npm run docs # Generate API docs to docs/
99-
npm run report # Captor API report (--ids id1 id2 ... [--title, --countries, --from-date, --to-date, --filename, --no-open, --no-logo])
100-
npm run report:iris # Iris Bond + Benchmark preset
101-
npm run report:captor # Same as report (default Captor IDs)
102-
npm run plot:iris # Full-page plot (Captor Iris Bond + Benchmark)
103-
npm run plot # Plot with default Captor IDs (same options as report)
104-
npm run plot:captor # Same as plot
151+
npm run efficient-frontier -- --simulations 3000 --points 25 --no-open
105152
```
106153

107154
## License

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)