openalgo-script 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1050 -0
- package/README.md +111 -27
- package/dist/adapters/charts/driving.d.ts +50 -0
- package/dist/adapters/charts/driving.d.ts.map +1 -0
- package/dist/adapters/charts/driving.js +57 -0
- package/dist/adapters/charts/driving.js.map +1 -0
- package/dist/adapters/charts/run.d.ts +20 -0
- package/dist/adapters/charts/run.d.ts.map +1 -1
- package/dist/adapters/charts/run.js +89 -16
- package/dist/adapters/charts/run.js.map +1 -1
- package/dist/adapters/charts/tables.d.ts +6 -19
- package/dist/adapters/charts/tables.d.ts.map +1 -1
- package/dist/adapters/charts/tables.js.map +1 -1
- package/dist/adapters/charts/undrawable.d.ts +4 -0
- package/dist/adapters/charts/undrawable.d.ts.map +1 -0
- package/dist/adapters/charts/undrawable.js +47 -0
- package/dist/adapters/charts/undrawable.js.map +1 -0
- package/dist/adapters/charts/venue.d.ts +73 -0
- package/dist/adapters/charts/venue.d.ts.map +1 -0
- package/dist/adapters/charts/venue.js +104 -0
- package/dist/adapters/charts/venue.js.map +1 -0
- package/dist/core/accounting/analysis.d.ts +111 -0
- package/dist/core/accounting/analysis.d.ts.map +1 -0
- package/dist/core/accounting/analysis.js +123 -0
- package/dist/core/accounting/analysis.js.map +1 -0
- package/dist/core/accounting/equity.d.ts +33 -0
- package/dist/core/accounting/equity.d.ts.map +1 -1
- package/dist/core/accounting/equity.js +12 -0
- package/dist/core/accounting/equity.js.map +1 -1
- package/dist/core/accounting/index.d.ts +2 -0
- package/dist/core/accounting/index.d.ts.map +1 -1
- package/dist/core/accounting/index.js +1 -0
- package/dist/core/accounting/index.js.map +1 -1
- package/dist/core/accounting/report.d.ts +3 -0
- package/dist/core/accounting/report.d.ts.map +1 -1
- package/dist/core/accounting/report.js +2 -0
- package/dist/core/accounting/report.js.map +1 -1
- package/dist/core/accounting/statistics.d.ts +12 -0
- package/dist/core/accounting/statistics.d.ts.map +1 -1
- package/dist/core/accounting/statistics.js +23 -1
- package/dist/core/accounting/statistics.js.map +1 -1
- package/dist/core/backtest/case.d.ts +60 -0
- package/dist/core/backtest/case.d.ts.map +1 -0
- package/dist/core/backtest/case.js +319 -0
- package/dist/core/backtest/case.js.map +1 -0
- package/dist/core/backtest/compare.d.ts.map +1 -1
- package/dist/core/backtest/compare.js +2 -0
- package/dist/core/backtest/compare.js.map +1 -1
- package/dist/core/backtest/deliver.d.ts +93 -0
- package/dist/core/backtest/deliver.d.ts.map +1 -0
- package/dist/core/backtest/deliver.js +94 -0
- package/dist/core/backtest/deliver.js.map +1 -0
- package/dist/core/backtest/drive.d.ts +101 -8
- package/dist/core/backtest/drive.d.ts.map +1 -1
- package/dist/core/backtest/drive.js +114 -158
- package/dist/core/backtest/drive.js.map +1 -1
- package/dist/core/backtest/index.d.ts +26 -12
- package/dist/core/backtest/index.d.ts.map +1 -1
- package/dist/core/backtest/index.js +21 -10
- package/dist/core/backtest/index.js.map +1 -1
- package/dist/core/backtest/record.d.ts +63 -2
- package/dist/core/backtest/record.d.ts.map +1 -1
- package/dist/core/backtest/record.js +71 -4
- package/dist/core/backtest/record.js.map +1 -1
- package/dist/core/backtest/replay.d.ts.map +1 -1
- package/dist/core/backtest/replay.js +11 -1
- package/dist/core/backtest/replay.js.map +1 -1
- package/dist/core/backtest/simulate.d.ts +113 -1
- package/dist/core/backtest/simulate.d.ts.map +1 -1
- package/dist/core/backtest/simulate.js +123 -5
- package/dist/core/backtest/simulate.js.map +1 -1
- package/dist/core/backtest/walk.d.ts +39 -0
- package/dist/core/backtest/walk.d.ts.map +1 -0
- package/dist/core/backtest/walk.js +125 -0
- package/dist/core/backtest/walk.js.map +1 -0
- package/dist/core/catalogue/catalogue.generated.d.ts +179 -2
- package/dist/core/catalogue/catalogue.generated.d.ts.map +1 -1
- package/dist/core/catalogue/catalogue.generated.js +19 -2
- package/dist/core/catalogue/catalogue.generated.js.map +1 -1
- package/dist/core/catalogue/types.d.ts +8 -2
- package/dist/core/catalogue/types.d.ts.map +1 -1
- package/dist/core/catalogue/values.generated.d.ts +51 -0
- package/dist/core/catalogue/values.generated.d.ts.map +1 -1
- package/dist/core/check/assigned.d.ts +19 -0
- package/dist/core/check/assigned.d.ts.map +1 -0
- package/dist/core/check/assigned.js +14 -0
- package/dist/core/check/assigned.js.map +1 -0
- package/dist/core/check/call-sites.d.ts.map +1 -1
- package/dist/core/check/call-sites.js +9 -4
- package/dist/core/check/call-sites.js.map +1 -1
- package/dist/core/check/calls.d.ts.map +1 -1
- package/dist/core/check/calls.js +12 -4
- package/dist/core/check/calls.js.map +1 -1
- package/dist/core/check/check.d.ts.map +1 -1
- package/dist/core/check/check.js +15 -2
- package/dist/core/check/check.js.map +1 -1
- package/dist/core/check/checker.d.ts +26 -0
- package/dist/core/check/checker.d.ts.map +1 -1
- package/dist/core/check/checker.js +38 -2
- package/dist/core/check/checker.js.map +1 -1
- package/dist/core/check/constant.d.ts +16 -0
- package/dist/core/check/constant.d.ts.map +1 -1
- package/dist/core/check/constant.js +52 -0
- package/dist/core/check/constant.js.map +1 -1
- package/dist/core/check/deleted.d.ts +3 -0
- package/dist/core/check/deleted.d.ts.map +1 -0
- package/dist/core/check/deleted.js +109 -0
- package/dist/core/check/deleted.js.map +1 -0
- package/dist/core/check/expressions.js +1 -1
- package/dist/core/check/expressions.js.map +1 -1
- package/dist/core/check/library-orders.js +2 -2
- package/dist/core/check/library-orders.js.map +1 -1
- package/dist/core/check/library-output.d.ts.map +1 -1
- package/dist/core/check/library-output.js +1 -0
- package/dist/core/check/library-output.js.map +1 -1
- package/dist/core/check/library-prose.generated.js +12 -12
- package/dist/core/check/library-prose.generated.js.map +1 -1
- package/dist/core/check/library.d.ts +7 -0
- package/dist/core/check/library.d.ts.map +1 -1
- package/dist/core/check/library.js +1 -0
- package/dist/core/check/library.js.map +1 -1
- package/dist/core/check/surface.d.ts +9 -0
- package/dist/core/check/surface.d.ts.map +1 -1
- package/dist/core/check/surface.js +13 -0
- package/dist/core/check/surface.js.map +1 -1
- package/dist/core/emit/canonical.d.ts +22 -8
- package/dist/core/emit/canonical.d.ts.map +1 -1
- package/dist/core/emit/canonical.js +67 -6
- package/dist/core/emit/canonical.js.map +1 -1
- package/dist/core/engine/arithmetic.d.ts +6 -25
- package/dist/core/engine/arithmetic.d.ts.map +1 -1
- package/dist/core/engine/arithmetic.js +48 -3
- package/dist/core/engine/arithmetic.js.map +1 -1
- package/dist/core/engine/bar-source.d.ts +65 -0
- package/dist/core/engine/bar-source.d.ts.map +1 -0
- package/dist/core/engine/bar-source.js +58 -0
- package/dist/core/engine/bar-source.js.map +1 -0
- package/dist/core/engine/engine.d.ts +9 -11
- package/dist/core/engine/engine.d.ts.map +1 -1
- package/dist/core/engine/engine.js +24 -24
- package/dist/core/engine/engine.js.map +1 -1
- package/dist/core/engine/guard.d.ts.map +1 -1
- package/dist/core/engine/guard.js +10 -0
- package/dist/core/engine/guard.js.map +1 -1
- package/dist/core/engine/host.d.ts +4 -2
- package/dist/core/engine/host.d.ts.map +1 -1
- package/dist/core/engine/host.js.map +1 -1
- package/dist/core/engine/index.d.ts +2 -1
- package/dist/core/engine/index.d.ts.map +1 -1
- package/dist/core/engine/index.js +1 -1
- package/dist/core/engine/index.js.map +1 -1
- package/dist/core/engine/library/arrays.d.ts.map +1 -1
- package/dist/core/engine/library/arrays.js +8 -2
- package/dist/core/engine/library/arrays.js.map +1 -1
- package/dist/core/engine/library/binding.d.ts +2 -0
- package/dist/core/engine/library/binding.d.ts.map +1 -1
- package/dist/core/engine/library/binding.js.map +1 -1
- package/dist/core/engine/library/code-points.d.ts +40 -0
- package/dist/core/engine/library/code-points.d.ts.map +1 -0
- package/dist/core/engine/library/code-points.js +74 -0
- package/dist/core/engine/library/code-points.js.map +1 -0
- package/dist/core/engine/library/index.d.ts +13 -0
- package/dist/core/engine/library/index.d.ts.map +1 -1
- package/dist/core/engine/library/index.js +15 -0
- package/dist/core/engine/library/index.js.map +1 -1
- package/dist/core/engine/library/objects.d.ts.map +1 -1
- package/dist/core/engine/library/objects.js +1 -1
- package/dist/core/engine/library/objects.js.map +1 -1
- package/dist/core/engine/library/text.d.ts.map +1 -1
- package/dist/core/engine/library/text.js +51 -34
- package/dist/core/engine/library/text.js.map +1 -1
- package/dist/core/engine/load.d.ts +20 -0
- package/dist/core/engine/load.d.ts.map +1 -1
- package/dist/core/engine/load.js +62 -0
- package/dist/core/engine/load.js.map +1 -1
- package/dist/core/engine/request-body.d.ts +3 -1
- package/dist/core/engine/request-body.d.ts.map +1 -1
- package/dist/core/engine/request-body.js +3 -1
- package/dist/core/engine/request-body.js.map +1 -1
- package/dist/core/engine/request-plan.d.ts +3 -3
- package/dist/core/engine/request-plan.js +3 -3
- package/dist/core/engine/requests.d.ts +2 -2
- package/dist/core/engine/requests.d.ts.map +1 -1
- package/dist/core/engine/requests.js +5 -4
- package/dist/core/engine/requests.js.map +1 -1
- package/dist/core/engine/series.d.ts +18 -6
- package/dist/core/engine/series.d.ts.map +1 -1
- package/dist/core/engine/series.js +24 -5
- package/dist/core/engine/series.js.map +1 -1
- package/dist/core/engine/session/record.d.ts +4 -4
- package/dist/core/engine/session/record.js +4 -4
- package/dist/core/engine/verify-tables.d.ts.map +1 -1
- package/dist/core/engine/verify-tables.js +41 -0
- package/dist/core/engine/verify-tables.js.map +1 -1
- package/dist/core/importer/calls.d.ts +29 -0
- package/dist/core/importer/calls.d.ts.map +1 -0
- package/dist/core/importer/calls.js +267 -0
- package/dist/core/importer/calls.js.map +1 -0
- package/dist/core/importer/context.d.ts +118 -0
- package/dist/core/importer/context.d.ts.map +1 -0
- package/dist/core/importer/context.js +120 -0
- package/dist/core/importer/context.js.map +1 -0
- package/dist/core/importer/expressions.d.ts +44 -0
- package/dist/core/importer/expressions.d.ts.map +1 -0
- package/dist/core/importer/expressions.js +223 -0
- package/dist/core/importer/expressions.js.map +1 -0
- package/dist/core/importer/importer.d.ts +13 -0
- package/dist/core/importer/importer.d.ts.map +1 -0
- package/dist/core/importer/importer.js +220 -0
- package/dist/core/importer/importer.js.map +1 -0
- package/dist/core/importer/index.d.ts +20 -0
- package/dist/core/importer/index.d.ts.map +1 -0
- package/dist/core/importer/index.js +18 -0
- package/dist/core/importer/index.js.map +1 -0
- package/dist/core/importer/lexer.d.ts +68 -0
- package/dist/core/importer/lexer.d.ts.map +1 -0
- package/dist/core/importer/lexer.js +207 -0
- package/dist/core/importer/lexer.js.map +1 -0
- package/dist/core/importer/names.d.ts +41 -0
- package/dist/core/importer/names.d.ts.map +1 -0
- package/dist/core/importer/names.js +78 -0
- package/dist/core/importer/names.js.map +1 -0
- package/dist/core/importer/orders.d.ts +8 -0
- package/dist/core/importer/orders.d.ts.map +1 -0
- package/dist/core/importer/orders.js +332 -0
- package/dist/core/importer/orders.js.map +1 -0
- package/dist/core/importer/outputs.d.ts +19 -0
- package/dist/core/importer/outputs.d.ts.map +1 -0
- package/dist/core/importer/outputs.js +266 -0
- package/dist/core/importer/outputs.js.map +1 -0
- package/dist/core/importer/parser.d.ts +5 -0
- package/dist/core/importer/parser.d.ts.map +1 -0
- package/dist/core/importer/parser.js +439 -0
- package/dist/core/importer/parser.js.map +1 -0
- package/dist/core/importer/presence.d.ts +32 -0
- package/dist/core/importer/presence.d.ts.map +1 -0
- package/dist/core/importer/presence.js +146 -0
- package/dist/core/importer/presence.js.map +1 -0
- package/dist/core/importer/settle.d.ts +23 -0
- package/dist/core/importer/settle.d.ts.map +1 -0
- package/dist/core/importer/settle.js +135 -0
- package/dist/core/importer/settle.js.map +1 -0
- package/dist/core/importer/statements.d.ts +4 -0
- package/dist/core/importer/statements.d.ts.map +1 -0
- package/dist/core/importer/statements.js +339 -0
- package/dist/core/importer/statements.js.map +1 -0
- package/dist/core/importer/syntax.d.ts +182 -0
- package/dist/core/importer/syntax.d.ts.map +1 -0
- package/dist/core/importer/syntax.js +14 -0
- package/dist/core/importer/syntax.js.map +1 -0
- package/dist/core/importer/table.d.ts +52 -0
- package/dist/core/importer/table.d.ts.map +1 -0
- package/dist/core/importer/table.js +156 -0
- package/dist/core/importer/table.js.map +1 -0
- package/dist/core/importer/values.d.ts +27 -0
- package/dist/core/importer/values.d.ts.map +1 -0
- package/dist/core/importer/values.js +236 -0
- package/dist/core/importer/values.js.map +1 -0
- package/dist/core/index.d.ts +22 -5
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +19 -3
- package/dist/core/index.js.map +1 -1
- package/dist/core/stdlib/calendar/civil.d.ts.map +1 -1
- package/dist/core/stdlib/calendar/civil.js +5 -2
- package/dist/core/stdlib/calendar/civil.js.map +1 -1
- package/dist/core/stdlib/index.d.ts +1 -1
- package/dist/core/stdlib/index.d.ts.map +1 -1
- package/dist/core/stdlib/index.js +1 -1
- package/dist/core/stdlib/index.js.map +1 -1
- package/dist/core/stdlib/maths/index.d.ts +1 -1
- package/dist/core/stdlib/maths/index.d.ts.map +1 -1
- package/dist/core/stdlib/maths/index.js +1 -1
- package/dist/core/stdlib/maths/index.js.map +1 -1
- package/dist/core/stdlib/maths/rounding.d.ts +5 -0
- package/dist/core/stdlib/maths/rounding.d.ts.map +1 -1
- package/dist/core/stdlib/maths/rounding.js +19 -1
- package/dist/core/stdlib/maths/rounding.js.map +1 -1
- package/dist/core/version/version.generated.d.ts +1 -1
- package/dist/core/version/version.generated.js +1 -1
- package/package.json +17 -2
- package/spec/README.md +2 -1
- package/spec/errors.json +383 -23
- package/src/adapters/charts/driving.ts +109 -0
- package/src/adapters/charts/run.ts +126 -28
- package/src/adapters/charts/tables.ts +6 -19
- package/src/adapters/charts/undrawable.ts +51 -0
- package/src/adapters/charts/venue.ts +132 -0
- package/src/core/accounting/analysis.ts +188 -0
- package/src/core/accounting/equity.ts +38 -0
- package/src/core/accounting/index.ts +2 -0
- package/src/core/accounting/report.ts +5 -0
- package/src/core/accounting/statistics.ts +38 -1
- package/src/core/backtest/case.ts +395 -0
- package/src/core/backtest/compare.ts +2 -0
- package/src/core/backtest/deliver.ts +161 -0
- package/src/core/backtest/drive.ts +233 -217
- package/src/core/backtest/index.ts +26 -12
- package/src/core/backtest/record.ts +134 -5
- package/src/core/backtest/replay.ts +11 -1
- package/src/core/backtest/simulate.ts +201 -6
- package/src/core/backtest/walk.ts +182 -0
- package/src/core/catalogue/catalogue.generated.ts +19 -2
- package/src/core/catalogue/types.ts +8 -2
- package/src/core/catalogue/values.generated.ts +16 -0
- package/src/core/check/assigned.ts +31 -0
- package/src/core/check/call-sites.ts +11 -4
- package/src/core/check/calls.ts +13 -4
- package/src/core/check/check.ts +14 -2
- package/src/core/check/checker.ts +39 -2
- package/src/core/check/constant.ts +57 -0
- package/src/core/check/deleted.ts +135 -0
- package/src/core/check/expressions.ts +1 -1
- package/src/core/check/library-orders.ts +2 -2
- package/src/core/check/library-output.ts +1 -0
- package/src/core/check/library-prose.generated.ts +12 -12
- package/src/core/check/library.ts +8 -0
- package/src/core/check/surface.ts +16 -0
- package/src/core/emit/canonical.ts +67 -9
- package/src/core/engine/arithmetic.ts +23 -3
- package/src/core/engine/bar-source.ts +113 -0
- package/src/core/engine/engine.ts +26 -25
- package/src/core/engine/guard.ts +12 -1
- package/src/core/engine/host.ts +4 -2
- package/src/core/engine/index.ts +2 -1
- package/src/core/engine/library/arrays.ts +8 -2
- package/src/core/engine/library/binding.ts +2 -0
- package/src/core/engine/library/code-points.ts +73 -0
- package/src/core/engine/library/index.ts +17 -0
- package/src/core/engine/library/objects.ts +1 -6
- package/src/core/engine/library/text.ts +53 -35
- package/src/core/engine/load.ts +68 -0
- package/src/core/engine/request-body.ts +5 -7
- package/src/core/engine/request-plan.ts +3 -3
- package/src/core/engine/requests.ts +11 -8
- package/src/core/engine/series.ts +30 -6
- package/src/core/engine/session/record.ts +4 -4
- package/src/core/engine/verify-tables.ts +43 -0
- package/src/core/importer/calls.ts +274 -0
- package/src/core/importer/context.ts +197 -0
- package/src/core/importer/expressions.ts +247 -0
- package/src/core/importer/importer.ts +226 -0
- package/src/core/importer/index.ts +19 -0
- package/src/core/importer/lexer.ts +285 -0
- package/src/core/importer/names.ts +104 -0
- package/src/core/importer/orders.ts +307 -0
- package/src/core/importer/outputs.ts +245 -0
- package/src/core/importer/parser.ts +436 -0
- package/src/core/importer/presence.ts +164 -0
- package/src/core/importer/settle.ts +141 -0
- package/src/core/importer/statements.ts +331 -0
- package/src/core/importer/syntax.ts +144 -0
- package/src/core/importer/table.ts +191 -0
- package/src/core/importer/values.ts +241 -0
- package/src/core/index.ts +29 -2
- package/src/core/stdlib/calendar/civil.ts +5 -2
- package/src/core/stdlib/index.ts +1 -0
- package/src/core/stdlib/maths/index.ts +1 -0
- package/src/core/stdlib/maths/rounding.ts +23 -1
- package/src/core/version/version.generated.ts +1 -1
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A case's rows and this engine's frames, and the destination between them.
|
|
3
|
+
*
|
|
4
|
+
* Both directions are here because they are one correspondence: a case names an
|
|
5
|
+
* order by an ordinal and an engine knows it by an id, so `Delivery` reads an
|
|
6
|
+
* ordinal into the id of the intent the run placed, and `framedAs` writes an id
|
|
7
|
+
* back out as the ordinal a case file prints. Split between two files, the two
|
|
8
|
+
* halves of it drift, and a suite whose rows say one thing and whose records
|
|
9
|
+
* say another is one nobody can read.
|
|
10
|
+
*
|
|
11
|
+
* `conformance.md` section 3: `frames.csv` supplies order frames the way
|
|
12
|
+
* `bars.csv` supplies bars, so a strategy case asserts the fold against input
|
|
13
|
+
* the engine did not choose. `simulate.ts` is the other destination this module
|
|
14
|
+
* has, the one that reads a bar and works out what a venue would have said.
|
|
15
|
+
* This one works nothing out. It holds the rows a case supplied, hands over the
|
|
16
|
+
* ones each boundary names, and the whole of its behaviour is the mapping
|
|
17
|
+
* between a row and a frame.
|
|
18
|
+
*
|
|
19
|
+
* **An ordinal is what a case can name, and an id is not.** A row names the nth
|
|
20
|
+
* intent the run placed, because no case can know the id an engine minted, so
|
|
21
|
+
* the intents are counted here in the order the run handed them over and the
|
|
22
|
+
* ordinal is read against that count. A row naming an ordinal the run never
|
|
23
|
+
* placed is delivered all the same, carrying an id no run mints: step 1 of
|
|
24
|
+
* `stdlib.md` 17.8 refuses a frame naming no row of the ledger, and that
|
|
25
|
+
* refusal is the ledger's to make. A destination that dropped the row instead
|
|
26
|
+
* would answer nothing at all where section 3 hands an engine a frame about an
|
|
27
|
+
* order its ledger does not hold, and the case would pass by the frame never
|
|
28
|
+
* having arrived.
|
|
29
|
+
*
|
|
30
|
+
* **What a row does not carry, this does not invent.** `host-interface.md` 7.2
|
|
31
|
+
* lets a frame say which instrument and product the destination booked the
|
|
32
|
+
* order under, and the file has no column for either, so neither is stated and
|
|
33
|
+
* the row keeps what its placement put there. The instant is the one the file
|
|
34
|
+
* does carry: a row states one or states `none`, and one that states none
|
|
35
|
+
* leaves `updatedAt` where the placement put it, which is what the fold does
|
|
36
|
+
* with a frame whose destination stated no instant.
|
|
37
|
+
*/
|
|
38
|
+
import type { OrderFrame, OrderIntent, RoutedEffect } from '../engine/index.js';
|
|
39
|
+
import type { RecordedFrame } from './record.js';
|
|
40
|
+
/** One frame, the boundary it was handed over at, and the row it came from. */
|
|
41
|
+
export interface Delivered {
|
|
42
|
+
readonly frame: OrderFrame;
|
|
43
|
+
readonly afterBar: number;
|
|
44
|
+
/**
|
|
45
|
+
* The row a case supplied, or null where the run's own destination answered
|
|
46
|
+
* the frame and there is no row until the record is written.
|
|
47
|
+
*/
|
|
48
|
+
readonly row: RecordedFrame | null;
|
|
49
|
+
}
|
|
50
|
+
/** Where a run's orders go, and what it is told between two of its bars. */
|
|
51
|
+
export interface Destination {
|
|
52
|
+
/** Step 9: what the strategy decided, on the bar it decided it. */
|
|
53
|
+
route(effect: RoutedEffect, barIndex: number): void;
|
|
54
|
+
/** What this destination hands over at the boundary after `barIndex`. */
|
|
55
|
+
answers(barIndex: number): readonly Delivered[];
|
|
56
|
+
/** Every intent it was handed, in the order it was handed them. */
|
|
57
|
+
readonly intents: readonly OrderIntent[];
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* A destination holding one case's frames, ready at the boundaries they name.
|
|
61
|
+
*
|
|
62
|
+
* Built before the run rather than during it, because the rows are input: what
|
|
63
|
+
* a boundary hands over was decided by whoever wrote the case and not by
|
|
64
|
+
* anything this run does. The one thing it learns as the run goes is which
|
|
65
|
+
* intent an ordinal names, which only the run can say.
|
|
66
|
+
*/
|
|
67
|
+
export declare class Delivery implements Destination {
|
|
68
|
+
readonly intents: OrderIntent[];
|
|
69
|
+
/** The rows of each boundary, in file order, which section 3 fixes as the delivery order. */
|
|
70
|
+
private readonly rows;
|
|
71
|
+
constructor(frames: readonly RecordedFrame[]);
|
|
72
|
+
/** Nothing is decided by an order arriving here: it is counted, and that is all. */
|
|
73
|
+
route(effect: RoutedEffect): void;
|
|
74
|
+
answers(barIndex: number): readonly Delivered[];
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* The ordinal of every intent, which is how a case names one.
|
|
78
|
+
*
|
|
79
|
+
* One, two, three in the order the run placed them, because no engine can know
|
|
80
|
+
* the id another minted and a case that named one would only ever be readable
|
|
81
|
+
* by the engine that wrote it.
|
|
82
|
+
*/
|
|
83
|
+
export declare function ordinalsOf(intents: readonly OrderIntent[]): ReadonlyMap<number, number>;
|
|
84
|
+
/**
|
|
85
|
+
* One delivered frame, in the columns a case file prints.
|
|
86
|
+
*
|
|
87
|
+
* The instant travels with it. `stdlib.md` 17.7 folds `updatedAt` from a
|
|
88
|
+
* frame's `time`, so a driver that dropped the field here wrote a record whose
|
|
89
|
+
* ledger no engine could fold from the record's own frames: it would have
|
|
90
|
+
* nothing to move that field to and would leave it at `placedAt`.
|
|
91
|
+
*/
|
|
92
|
+
export declare function framedAs(frame: OrderFrame, afterBar: number, ordinals: ReadonlyMap<number, number>): RecordedFrame;
|
|
93
|
+
//# sourceMappingURL=deliver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deliver.d.ts","source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tB,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GACpC,aAAa,CAWf"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An id no run mints, which a row naming no intent of this run is delivered
|
|
3
|
+
* under.
|
|
4
|
+
*
|
|
5
|
+
* Ids are counted from one by the ledger that mints them, so nothing below one
|
|
6
|
+
* can name a row and the fold refuses the frame by the rule it refuses every
|
|
7
|
+
* other unknown one by. The alternative was an id of a real row chosen by some
|
|
8
|
+
* rule of this file's own, which would fold a case's frame into whichever order
|
|
9
|
+
* happened to be near it.
|
|
10
|
+
*/
|
|
11
|
+
const NO_INTENT = -1;
|
|
12
|
+
/**
|
|
13
|
+
* A destination holding one case's frames, ready at the boundaries they name.
|
|
14
|
+
*
|
|
15
|
+
* Built before the run rather than during it, because the rows are input: what
|
|
16
|
+
* a boundary hands over was decided by whoever wrote the case and not by
|
|
17
|
+
* anything this run does. The one thing it learns as the run goes is which
|
|
18
|
+
* intent an ordinal names, which only the run can say.
|
|
19
|
+
*/
|
|
20
|
+
export class Delivery {
|
|
21
|
+
intents = [];
|
|
22
|
+
/** The rows of each boundary, in file order, which section 3 fixes as the delivery order. */
|
|
23
|
+
rows = new Map();
|
|
24
|
+
constructor(frames) {
|
|
25
|
+
for (const row of frames) {
|
|
26
|
+
const at = this.rows.get(row.afterBar);
|
|
27
|
+
if (at === undefined)
|
|
28
|
+
this.rows.set(row.afterBar, [row]);
|
|
29
|
+
else
|
|
30
|
+
at.push(row);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/** Nothing is decided by an order arriving here: it is counted, and that is all. */
|
|
34
|
+
route(effect) {
|
|
35
|
+
for (const intent of effect.intents)
|
|
36
|
+
this.intents.push(intent);
|
|
37
|
+
}
|
|
38
|
+
answers(barIndex) {
|
|
39
|
+
const due = this.rows.get(barIndex) ?? [];
|
|
40
|
+
return due.map((row) => ({
|
|
41
|
+
frame: frameOf(row, this.intents[row.intent - 1]),
|
|
42
|
+
afterBar: barIndex,
|
|
43
|
+
row,
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/** One row of a case, as the frame `host-interface.md` 7.2 describes. */
|
|
48
|
+
function frameOf(row, intent) {
|
|
49
|
+
return {
|
|
50
|
+
intentId: intent?.intentId ?? NO_INTENT,
|
|
51
|
+
status: row.status,
|
|
52
|
+
filledQty: row.filledQty,
|
|
53
|
+
avgFillPrice: row.avgFillPrice,
|
|
54
|
+
orderRef: row.orderRef,
|
|
55
|
+
text: row.text,
|
|
56
|
+
time: row.time,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* The ordinal of every intent, which is how a case names one.
|
|
61
|
+
*
|
|
62
|
+
* One, two, three in the order the run placed them, because no engine can know
|
|
63
|
+
* the id another minted and a case that named one would only ever be readable
|
|
64
|
+
* by the engine that wrote it.
|
|
65
|
+
*/
|
|
66
|
+
export function ordinalsOf(intents) {
|
|
67
|
+
const out = new Map();
|
|
68
|
+
for (const intent of intents) {
|
|
69
|
+
if (!out.has(intent.intentId))
|
|
70
|
+
out.set(intent.intentId, out.size + 1);
|
|
71
|
+
}
|
|
72
|
+
return out;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* One delivered frame, in the columns a case file prints.
|
|
76
|
+
*
|
|
77
|
+
* The instant travels with it. `stdlib.md` 17.7 folds `updatedAt` from a
|
|
78
|
+
* frame's `time`, so a driver that dropped the field here wrote a record whose
|
|
79
|
+
* ledger no engine could fold from the record's own frames: it would have
|
|
80
|
+
* nothing to move that field to and would leave it at `placedAt`.
|
|
81
|
+
*/
|
|
82
|
+
export function framedAs(frame, afterBar, ordinals) {
|
|
83
|
+
return {
|
|
84
|
+
afterBar,
|
|
85
|
+
intent: ordinals.get(frame.intentId) ?? 0,
|
|
86
|
+
status: frame.status,
|
|
87
|
+
filledQty: frame.filledQty,
|
|
88
|
+
avgFillPrice: frame.avgFillPrice ?? null,
|
|
89
|
+
orderRef: frame.orderRef ?? null,
|
|
90
|
+
text: frame.text ?? null,
|
|
91
|
+
time: frame.time ?? null,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=deliver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deliver.js","sourceRoot":"","sources":["../../../src/core/backtest/deliver.ts"],"names":[],"mappings":"AA6DA;;;;;;;;;GASG;AACH,MAAM,SAAS,GAAG,CAAC,CAAC,CAAC;AAErB;;;;;;;GAOG;AACH,MAAM,OAAO,QAAQ;IACV,OAAO,GAAkB,EAAE,CAAC;IACrC,6FAA6F;IAC5E,IAAI,GAAG,IAAI,GAAG,EAA2B,CAAC;IAE3D,YAAY,MAAgC;QAC1C,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;YACzB,MAAM,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YACvC,IAAI,EAAE,KAAK,SAAS;gBAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;;gBACpD,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACpB,CAAC;IACH,CAAC;IAED,oFAAoF;IACpF,KAAK,CAAC,MAAoB;QACxB,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,OAAO;YAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACjE,CAAC;IAED,OAAO,CAAC,QAAgB;QACtB,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QAC1C,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;YACvB,KAAK,EAA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QAAQ,IAAI,IAAI;QAChC,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,IAAI;QACxB,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,IAAI;KACzB,CAAC;AACJ,CAAC"}
|
|
@@ -1,29 +1,122 @@
|
|
|
1
1
|
import type { Diagnostic } from '../diagnostics/index.js';
|
|
2
2
|
import type { CompiledProgram } from '../emit/index.js';
|
|
3
|
-
import type {
|
|
3
|
+
import type { Drawing, Grid, Instrument, RequestProvider, Value } from '../engine/index.js';
|
|
4
|
+
import type { RecordedBar, RecordedFrame, RunRecord } from './record.js';
|
|
5
|
+
import type { LogLine } from './walk.js';
|
|
4
6
|
import type { BacktestSettings } from './settings.js';
|
|
5
7
|
/** What a run came to, or why it could not be carried out at all. */
|
|
6
8
|
export type BacktestResult = {
|
|
7
9
|
readonly ok: true;
|
|
8
10
|
readonly record: RunRecord;
|
|
11
|
+
readonly rows?: readonly (readonly Value[])[];
|
|
12
|
+
readonly log?: readonly LogLine[];
|
|
13
|
+
readonly surface?: Surface;
|
|
9
14
|
} | {
|
|
10
15
|
readonly ok: false;
|
|
11
16
|
readonly diagnostic: Diagnostic;
|
|
12
17
|
};
|
|
18
|
+
/** The drawing objects and the grids the last bar left, `conformance.md` section 4. */
|
|
19
|
+
export interface Surface {
|
|
20
|
+
readonly drawings: readonly Drawing[];
|
|
21
|
+
readonly tables: readonly Grid[];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The facts of `host-interface.md` 4.1 that the contract does not hold.
|
|
25
|
+
*
|
|
26
|
+
* The contract already states six of the twelve, the ones the money is priced
|
|
27
|
+
* under, and a fact stated in two places is a fact that can disagree with
|
|
28
|
+
* itself: a tick size the engine rounds to and a different one the venue
|
|
29
|
+
* worsens a fill by is a run under two instruments. So the other six are
|
|
30
|
+
* stated here and the six the contract holds cannot be, which the compiler
|
|
31
|
+
* enforces rather than a check at run time.
|
|
32
|
+
*/
|
|
33
|
+
export type InstrumentFacts = Omit<Instrument, 'symbol' | 'exchange' | 'tickSize' | 'lotSize' | 'pointValue' | 'currency'>;
|
|
13
34
|
/** The few choices a driver has that are not settings of the run itself. */
|
|
14
35
|
export interface DriveOptions {
|
|
15
36
|
/** Whether the bars travel in the record. Inline is the conformance form. */
|
|
16
37
|
readonly form?: 'inline' | 'referenced';
|
|
38
|
+
/**
|
|
39
|
+
* What the host states about the instrument beside the contract, so the
|
|
40
|
+
* record it produces is a conformance case.
|
|
41
|
+
*
|
|
42
|
+
* A case holds `instrument.json`, which `conformance.md` section 2 says is
|
|
43
|
+
* the record of `host-interface.md` 4.1, and that page requires one fact of
|
|
44
|
+
* every host: `hasVolume`, because no derivation recovers it (4.2). The
|
|
45
|
+
* engine reads the record and does not refuse a run without it, so a caller
|
|
46
|
+
* that leaves this out gets a record that replays and reruns like any other
|
|
47
|
+
* and cannot become a case, exactly as one without `sourceText` cannot.
|
|
48
|
+
*
|
|
49
|
+
* A session stated without a timezone is refused at load, OS6012, by the
|
|
50
|
+
* same rule that refuses it for any host.
|
|
51
|
+
*/
|
|
52
|
+
readonly instrument?: InstrumentFacts;
|
|
53
|
+
/**
|
|
54
|
+
* The script's own text, so the record it produces is a conformance case.
|
|
55
|
+
*
|
|
56
|
+
* A compiled program identifies its source and cannot reproduce it, and a
|
|
57
|
+
* case has to hold `script.os`. A caller holding only a program leaves this
|
|
58
|
+
* out and gets a record that replays and reruns like any other; the one
|
|
59
|
+
* thing it cannot do is be handed to somebody else's engine as a case.
|
|
60
|
+
*
|
|
61
|
+
* It is checked against the program's own source hash, so text from a
|
|
62
|
+
* different revision than the one that was compiled is refused rather than
|
|
63
|
+
* written into a case that could never make its own expected output.
|
|
64
|
+
*/
|
|
65
|
+
readonly sourceText?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Whether to hand back every channel's value on every bar that ran, beside
|
|
68
|
+
* the record rather than inside it.
|
|
69
|
+
*
|
|
70
|
+
* A conformance case that asserts `values` compares one value per bar per
|
|
71
|
+
* plot, and the record holds none of them: it is the reproducible run, and a
|
|
72
|
+
* curve per plot is bytes it would carry for every run to serve the few cases
|
|
73
|
+
* that ask. So the rows are asked for, and a run that does not ask pays
|
|
74
|
+
* nothing. A bar that failed has no row, as in the second engine.
|
|
75
|
+
*/
|
|
76
|
+
readonly rows?: boolean;
|
|
77
|
+
/** Whether to hand back every line `print` wrote, beside the record, for the same reason. */
|
|
78
|
+
readonly log?: boolean;
|
|
79
|
+
/** Whether to hand back the drawing objects and grids the last bar left, for the same reason. */
|
|
80
|
+
readonly surface?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Bars for another instrument, `host-interface.md` 5, for a run whose host
|
|
83
|
+
* serves them.
|
|
84
|
+
*
|
|
85
|
+
* Left out, the run holds the chart's own bars and nothing else: a read of
|
|
86
|
+
* the chart's instrument at a coarser interval is folded from them, and a
|
|
87
|
+
* program that reads another instrument declares a capability this host does
|
|
88
|
+
* not have and is refused at load by name. Given, the host serves duty 3 and
|
|
89
|
+
* the engine asks it once per read, before bar 0.
|
|
90
|
+
*/
|
|
91
|
+
readonly requestBars?: RequestProvider;
|
|
17
92
|
}
|
|
18
93
|
/**
|
|
19
|
-
* One run, from a compiled program to a record
|
|
94
|
+
* One run against a simulated destination, from a compiled program to a record.
|
|
20
95
|
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* be a document asserting figures nothing computed. A failure during a bar is
|
|
25
|
-
* the other way round: the run happened, it stopped, and the record carries
|
|
26
|
-
* both what it did and the diagnostic that stopped it.
|
|
96
|
+
* The frames are the destination's own: it is handed the orders, it reads the
|
|
97
|
+
* bars, and what it answers is what the engine folds. A run whose frames
|
|
98
|
+
* somebody else is supplying is `backtestSupplied` below.
|
|
27
99
|
*/
|
|
28
100
|
export declare function backtest(program: CompiledProgram, bars: readonly RecordedBar[], settings: BacktestSettings, options?: DriveOptions): BacktestResult;
|
|
101
|
+
/**
|
|
102
|
+
* One run over the frames somebody else supplied, which this engine does not
|
|
103
|
+
* choose and does not add to.
|
|
104
|
+
*
|
|
105
|
+
* `conformance.md` section 3 gives a case a `frames.csv` that supplies order
|
|
106
|
+
* frames the way `bars.csv` supplies bars, so that a case asserts the fold
|
|
107
|
+
* against input the engine did not choose. Every other argument is `backtest`'s
|
|
108
|
+
* and means there what it means here. A row is delivered at the boundary it
|
|
109
|
+
* names and folded before the next bar, and the record carries the rows it was
|
|
110
|
+
* handed rather than a second spelling of them.
|
|
111
|
+
*
|
|
112
|
+
* **Nothing is invented.** No fill is priced off a bar, no order rests and no
|
|
113
|
+
* schedule is read, so an order the frames say nothing about stays where its
|
|
114
|
+
* placement left it, which is what a case saying nothing about it means.
|
|
115
|
+
*
|
|
116
|
+
* **A record made here is a record of this run and not of a simulated one.**
|
|
117
|
+
* `rerun` puts a record's program back on a simulated destination, because a
|
|
118
|
+
* record does not say which of the two answered it, so a rerun of one of these
|
|
119
|
+
* reproduces it only where that destination would answer these same frames.
|
|
120
|
+
*/
|
|
121
|
+
export declare function backtestSupplied(program: CompiledProgram, bars: readonly RecordedBar[], settings: BacktestSettings, frames: readonly RecordedFrame[], options?: DriveOptions): BacktestResult;
|
|
29
122
|
//# sourceMappingURL=drive.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drive.d.ts","sourceRoot":"","sources":["../../../src/core/backtest/drive.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"drive.d.ts","sourceRoot":"","sources":["../../../src/core/backtest/drive.ts"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD,OAAO,KAAK,EACV,OAAO,EAEP,IAAI,EACJ,UAAU,EAGV,eAAe,EAEf,KAAK,EACN,MAAM,oBAAoB,CAAC;AAO5B,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAiB,SAAS,EAAE,MAAM,aAAa,CAAC;AAI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