You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,7 @@ console.log(series.maxDrawdown()); // Max drawdown
27
27
-**Date utilities**: Business day calendars (via date-holidays), date offsets, period-end alignment
28
28
-**Captor API**: Fetch timeseries from Captor Open API (`fetchCaptorSeries`, `fetchCaptorSeriesBatch`)
29
29
-**Report**: `reportHtml(frame, options)` — programmatic HTML report; CLI via `npm run report`
30
+
-**Plot**: `plotSeriesHtml()`, `plotSeries()` — full-page series line chart (like Python `plot_series`)
30
31
31
32
## API Overview
32
33
@@ -60,6 +61,11 @@ console.log(series.maxDrawdown()); // Max drawdown
60
61
61
62
-`reportHtml(frame, options?)` — generate HTML report (cumulative performance, annual returns, stats) from an OpenFrame. Options: `title`, `logoUrl`, `addLogo`. Countries for business-day metrics come from `frame.countries`.
62
63
64
+
### Plot
65
+
66
+
-`plotSeriesHtml(seriesOrFrame, options?)` — generate full-page HTML with a line chart of cumulative returns (100 base). Works with `OpenTimeSeries` or `OpenFrame` (use `mergeSeries("inner")` first). Options: `title`, `logoUrl`, `addLogo`.
67
+
-`plotSeries(seriesOrFrame, options?)` — async: writes HTML to file and optionally opens in browser. Options: `title`, `logoUrl`, `addLogo`, `filename` (default: `~/Documents/plot.html`), `autoOpen` (default: true).
68
+
63
69
## Documentation
64
70
65
71
API reference: https://captorab.github.io/openseries-ts/
@@ -93,6 +99,9 @@ npm run docs # Generate API docs to docs/
93
99
npm run report # Captor API report (--ids id1 id2 ... [--title, --countries, --filename, --no-open, --no-logo])
94
100
npm run report:iris # Iris Bond + Benchmark preset
95
101
npm run report:captor # Same as report (default Captor IDs)
102
+
npm run plot:iris # Full-page plot (Captor Iris Bond + Benchmark)
0 commit comments