openalgo-script 0.5.0 → 0.7.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 +226 -0
- package/README.md +53 -22
- package/dist/adapters/charts/run.d.ts.map +1 -1
- package/dist/adapters/charts/run.js +6 -0
- 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/core/backtest/drive.d.ts +36 -1
- package/dist/core/backtest/drive.d.ts.map +1 -1
- package/dist/core/backtest/drive.js +13 -107
- package/dist/core/backtest/drive.js.map +1 -1
- package/dist/core/backtest/index.d.ts +2 -0
- package/dist/core/backtest/index.d.ts.map +1 -1
- package/dist/core/backtest/index.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 +178 -1
- package/dist/core/catalogue/catalogue.generated.d.ts.map +1 -1
- package/dist/core/catalogue/catalogue.generated.js +18 -1
- 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-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 +10 -10
- 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/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/channels.js +2 -2
- package/dist/core/engine/channels.js.map +1 -1
- 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 +26 -27
- 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 +1 -0
- package/dist/core/engine/index.d.ts.map +1 -1
- package/dist/core/engine/index.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/index.d.ts +8 -0
- package/dist/core/engine/library/index.d.ts.map +1 -1
- package/dist/core/engine/library/index.js +10 -0
- package/dist/core/engine/library/index.js.map +1 -1
- package/dist/core/engine/library/maths.js +2 -2
- package/dist/core/engine/library/maths.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/machine.js +5 -5
- package/dist/core/engine/machine.js.map +1 -1
- package/dist/core/engine/memory.js +2 -2
- package/dist/core/engine/memory.js.map +1 -1
- package/dist/core/engine/registers.js +2 -2
- package/dist/core/engine/registers.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/values/index.d.ts +1 -1
- package/dist/core/engine/values/index.d.ts.map +1 -1
- package/dist/core/engine/values/index.js +1 -1
- package/dist/core/engine/values/index.js.map +1 -1
- package/dist/core/engine/values/value.d.ts +2 -0
- package/dist/core/engine/values/value.d.ts.map +1 -1
- package/dist/core/engine/values/value.js +4 -0
- package/dist/core/engine/values/value.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 +12 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +11 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/stdlib/averages/exponential.d.ts.map +1 -1
- package/dist/core/stdlib/averages/exponential.js +3 -6
- package/dist/core/stdlib/averages/exponential.js.map +1 -1
- package/dist/core/stdlib/averages/gaussian.d.ts +15 -0
- package/dist/core/stdlib/averages/gaussian.d.ts.map +1 -0
- package/dist/core/stdlib/averages/gaussian.js +55 -0
- package/dist/core/stdlib/averages/gaussian.js.map +1 -0
- package/dist/core/stdlib/averages/shaped.d.ts +2 -6
- package/dist/core/stdlib/averages/shaped.d.ts.map +1 -1
- package/dist/core/stdlib/averages/shaped.js +8 -22
- package/dist/core/stdlib/averages/shaped.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/maths/arithmetic.d.ts.map +1 -1
- package/dist/core/stdlib/maths/arithmetic.js +2 -1
- package/dist/core/stdlib/maths/arithmetic.js.map +1 -1
- package/dist/core/stdlib/maths/elementary.d.ts +3 -20
- package/dist/core/stdlib/maths/elementary.d.ts.map +1 -1
- package/dist/core/stdlib/maths/elementary.js +17 -13
- package/dist/core/stdlib/maths/elementary.js.map +1 -1
- package/dist/core/stdlib/maths/hypot.d.ts +8 -0
- package/dist/core/stdlib/maths/hypot.d.ts.map +1 -0
- package/dist/core/stdlib/maths/hypot.js +68 -0
- package/dist/core/stdlib/maths/hypot.js.map +1 -0
- package/dist/core/stdlib/maths/power.d.ts +3 -0
- package/dist/core/stdlib/maths/power.d.ts.map +1 -0
- package/dist/core/stdlib/maths/power.js +83 -0
- package/dist/core/stdlib/maths/power.js.map +1 -0
- package/dist/core/stdlib/maths/transcendental.d.ts +15 -0
- package/dist/core/stdlib/maths/transcendental.d.ts.map +1 -0
- package/dist/core/stdlib/maths/transcendental.js +185 -0
- package/dist/core/stdlib/maths/transcendental.js.map +1 -0
- package/dist/core/stdlib/maths/trigonometric.d.ts +4 -0
- package/dist/core/stdlib/maths/trigonometric.d.ts.map +1 -0
- package/dist/core/stdlib/maths/trigonometric.js +196 -0
- package/dist/core/stdlib/maths/trigonometric.js.map +1 -0
- package/dist/core/stdlib/series/conditions.d.ts +2 -4
- package/dist/core/stdlib/series/conditions.d.ts.map +1 -1
- package/dist/core/stdlib/series/conditions.js +9 -13
- package/dist/core/stdlib/series/conditions.js.map +1 -1
- package/dist/core/stdlib/series/statistics.d.ts.map +1 -1
- package/dist/core/stdlib/series/statistics.js +2 -0
- package/dist/core/stdlib/series/statistics.js.map +1 -1
- package/dist/core/stdlib/values/history.d.ts +26 -0
- package/dist/core/stdlib/values/history.d.ts.map +1 -0
- package/dist/core/stdlib/values/history.js +52 -0
- package/dist/core/stdlib/values/history.js.map +1 -0
- package/dist/core/stdlib/values/index.d.ts +1 -0
- package/dist/core/stdlib/values/index.d.ts.map +1 -1
- package/dist/core/stdlib/values/index.js +1 -0
- package/dist/core/stdlib/values/index.js.map +1 -1
- package/dist/core/stdlib/values/lookback.d.ts +4 -1
- package/dist/core/stdlib/values/lookback.d.ts.map +1 -1
- package/dist/core/stdlib/values/lookback.js +48 -45
- package/dist/core/stdlib/values/lookback.js.map +1 -1
- package/dist/core/stdlib/values/region.d.ts +6 -5
- package/dist/core/stdlib/values/region.d.ts.map +1 -1
- package/dist/core/stdlib/values/region.js +3 -3
- package/dist/core/stdlib/values/region.js.map +1 -1
- package/dist/core/stdlib/volatility/measures.d.ts.map +1 -1
- package/dist/core/stdlib/volatility/measures.js +6 -4
- package/dist/core/stdlib/volatility/measures.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 +13 -2
- package/spec/errors.json +380 -20
- package/src/adapters/charts/run.ts +6 -0
- package/src/adapters/charts/tables.ts +6 -19
- package/src/adapters/charts/undrawable.ts +51 -0
- package/src/core/backtest/drive.ts +66 -154
- package/src/core/backtest/index.ts +2 -0
- package/src/core/backtest/walk.ts +182 -0
- package/src/core/catalogue/catalogue.generated.ts +18 -1
- 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-output.ts +1 -0
- package/src/core/check/library-prose.generated.ts +10 -10
- package/src/core/check/library.ts +8 -0
- package/src/core/check/surface.ts +16 -0
- package/src/core/engine/bar-source.ts +113 -0
- package/src/core/engine/channels.ts +2 -2
- package/src/core/engine/engine.ts +29 -28
- package/src/core/engine/guard.ts +12 -1
- package/src/core/engine/host.ts +4 -2
- package/src/core/engine/index.ts +1 -0
- package/src/core/engine/library/binding.ts +2 -0
- package/src/core/engine/library/index.ts +11 -0
- package/src/core/engine/library/maths.ts +2 -2
- package/src/core/engine/library/objects.ts +1 -6
- package/src/core/engine/machine.ts +5 -5
- package/src/core/engine/memory.ts +2 -2
- package/src/core/engine/registers.ts +2 -2
- 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/values/index.ts +1 -0
- package/src/core/engine/values/value.ts +5 -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 +13 -0
- package/src/core/stdlib/averages/exponential.ts +3 -4
- package/src/core/stdlib/averages/gaussian.ts +52 -0
- package/src/core/stdlib/averages/shaped.ts +8 -21
- package/src/core/stdlib/calendar/civil.ts +5 -2
- package/src/core/stdlib/maths/arithmetic.ts +2 -1
- package/src/core/stdlib/maths/elementary.ts +20 -33
- package/src/core/stdlib/maths/hypot.ts +63 -0
- package/src/core/stdlib/maths/power.ts +57 -0
- package/src/core/stdlib/maths/transcendental.ts +160 -0
- package/src/core/stdlib/maths/trigonometric.ts +160 -0
- package/src/core/stdlib/series/conditions.ts +9 -12
- package/src/core/stdlib/series/statistics.ts +1 -0
- package/src/core/stdlib/values/history.ts +70 -0
- package/src/core/stdlib/values/index.ts +1 -0
- package/src/core/stdlib/values/lookback.ts +51 -47
- package/src/core/stdlib/values/region.ts +7 -5
- package/src/core/stdlib/volatility/measures.ts +6 -4
- package/src/core/version/version.generated.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,232 @@ nothing, fails the build before it can become permanent.
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## 0.7.0
|
|
11
|
+
|
|
12
|
+
Both engines now pass exact numerical comparisons for all 116 scalar and
|
|
13
|
+
stateful numerical signatures, with additional compiled cases for array
|
|
14
|
+
reductions and conversions. The audit checks 1,504,908 accepted calls and permits
|
|
15
|
+
no differing bit, absent value or output column. Both publishing workflows now
|
|
16
|
+
run the strict numerical gates as well as the complete package checks.
|
|
17
|
+
|
|
18
|
+
Upgrade both packages together when chart and server results must agree. No
|
|
19
|
+
source migration or compiled-format change is required. Corrected final bits,
|
|
20
|
+
warm-up boundaries and invalid-input behavior can change previously stored
|
|
21
|
+
results; regenerate any results that must be compared with this release.
|
|
22
|
+
|
|
23
|
+
The Python engine now returns absence rather
|
|
24
|
+
than raising a division exception when CCI's scaled deviation underflows to zero
|
|
25
|
+
or signed money flows produce a zero composed divisor. Later bars continue to
|
|
26
|
+
calculate, and ordinary values retain their existing arithmetic order.
|
|
27
|
+
|
|
28
|
+
Overflowed one-bar changes now become absent before Python's TSI and RSI
|
|
29
|
+
recurrences consume them. Ordinary later bars recover with the same values as
|
|
30
|
+
the JavaScript engine. Ultimate Oscillator also normalizes its named pressure,
|
|
31
|
+
range and window sums before division, avoiding a false zero when a range
|
|
32
|
+
overflows. Compiled history, forming-bar corrections and exact rational fixtures
|
|
33
|
+
cover these cases without changing the ordinary baseline vectors.
|
|
34
|
+
|
|
35
|
+
Python's MFI now propagates overflowing price-volume products and window sums
|
|
36
|
+
as absence. Its CCI also normalizes overflowing window means and deviations
|
|
37
|
+
before division. JavaScript correlation no longer reports zero when either
|
|
38
|
+
variance overflows. All three resume when the affected observations leave the
|
|
39
|
+
window. The audit now shocks price fields and volume independently, exercises
|
|
40
|
+
declared defaults and lengths one and two, and checks checkpoint restoration
|
|
41
|
+
and replay across those boundaries.
|
|
42
|
+
|
|
43
|
+
Both engines now compute two-argument hypotenuse from the exact squared inputs,
|
|
44
|
+
with one final nearest-even rounding. This removes host-dependent last-bit
|
|
45
|
+
differences, preserves subnormal results and returns absence when the rounded
|
|
46
|
+
result overflows. It can change the final bits of previously returned values.
|
|
47
|
+
|
|
48
|
+
Exponential and logarithmic calculations now use integer interval arithmetic and
|
|
49
|
+
one final nearest-even rounding in both engines. Gaussian averages, historical
|
|
50
|
+
volatility and choppiness use those same portable kernels. Values may differ in
|
|
51
|
+
their final bits from earlier versions. Gaussian weights use a bounded immutable
|
|
52
|
+
cache; changing kernel parameters requires more computation than repeated ones.
|
|
53
|
+
|
|
54
|
+
Power and trigonometric functions also use portable integer enclosures with
|
|
55
|
+
one final nearest-even rounding. Exact rational branches settle power midpoint
|
|
56
|
+
ties; full argument reduction preserves trigonometric results for very large
|
|
57
|
+
finite inputs. `atan2` uses the exact component ratio, including subnormal
|
|
58
|
+
components. These calls no longer use host approximations or conformance
|
|
59
|
+
tolerances, and power now participates in the shared vector corpus. Portable
|
|
60
|
+
math can be slower than host approximations; existing performance budgets
|
|
61
|
+
remain unchanged.
|
|
62
|
+
|
|
63
|
+
Gaussian width must be positive, and an underflowed exponent denominator returns
|
|
64
|
+
absence. Historical volatility requires positive source endpoints and a positive
|
|
65
|
+
annualization count in both engines. Hull smoothing now keeps source observations
|
|
66
|
+
that arrive while its length is absent in the JavaScript engine.
|
|
67
|
+
|
|
68
|
+
Anchored volume averages now wait for their first anchor in the Python engine.
|
|
69
|
+
A reset takes effect even when its bar has absent data; an absent reset condition
|
|
70
|
+
after initialization behaves as false and the bar still contributes. A money-flow
|
|
71
|
+
ratio propagates an overflowed named sum as absence. Channel bounds are available
|
|
72
|
+
independently, while their midpoint still requires both sides.
|
|
73
|
+
|
|
74
|
+
Finite windows in both engines now retain contributions needed by a later larger
|
|
75
|
+
length. The largest observed valid length sets readiness; the current length
|
|
76
|
+
selects values and the divisor. Shrinking a length does not restart its history,
|
|
77
|
+
and an absent length still contributes its source position. Immutable history
|
|
78
|
+
chunks share checkpoints without copying the full prefix on each bar. Retained
|
|
79
|
+
storage grows with contributions when no future length bound is known.
|
|
80
|
+
|
|
81
|
+
Seeded recurrences now share the changing-length policy in both engines. They
|
|
82
|
+
count pre-seed calls with absent lengths, use the current complete seed window
|
|
83
|
+
after maximum-length readiness, and continue valid steps while a later larger
|
|
84
|
+
length temporarily hides their output. Missing source or length freezes the
|
|
85
|
+
running value. Changing length never restarts an already seeded recurrence, and
|
|
86
|
+
seed history is released once it is no longer needed.
|
|
87
|
+
|
|
88
|
+
An overflowing seed mean now remains unseeded in the Python engine, allowing a
|
|
89
|
+
later finite suffix to recover. An overflow after a successful seed retains its
|
|
90
|
+
existing recurrence state; it does not silently restart the calculation.
|
|
91
|
+
|
|
92
|
+
Distance reads now retain the largest observed readiness in the Python engine.
|
|
93
|
+
Shrinking a history, change, momentum or rate-of-change distance no longer
|
|
94
|
+
returns a value before that prior warmup has completed. Missing intermediate
|
|
95
|
+
source values still preserve their positions without hiding valid endpoints.
|
|
96
|
+
|
|
97
|
+
Numeric negative zero is normalized at engine ingress, stores and library
|
|
98
|
+
results. Host-supplied values, requested registers, function arguments,
|
|
99
|
+
historical reads and fallback calls now preserve the same positive-zero bits in
|
|
100
|
+
both engines, while booleans, text and reference values retain their identity.
|
|
101
|
+
|
|
102
|
+
Event lookups now retain values needed by a later larger occurrence. Shrinking
|
|
103
|
+
the occurrence immediately selects the requested event instead of waiting on an
|
|
104
|
+
old depth. Absent event values keep their position. Retained storage grows with
|
|
105
|
+
true events, with immutable prefixes shared by checkpoints.
|
|
106
|
+
|
|
107
|
+
In the Python engine, extreme ages keep each independently available output,
|
|
108
|
+
stop initialization waits for two complete bars, and an overflowing trailing-band
|
|
109
|
+
midpoint leaves band state and its last accepted close unchanged.
|
|
110
|
+
|
|
111
|
+
Compiled conformance cases now cover those recovery paths, all five numeric array
|
|
112
|
+
reductions, empty and absent arrays, cancellation order and decimal conversion
|
|
113
|
+
boundaries. These checks supplement the existing shared library vectors.
|
|
114
|
+
|
|
115
|
+
## 0.6.0
|
|
116
|
+
|
|
117
|
+
**An engine that implemented nothing passed the conformance suite, and now does
|
|
118
|
+
not.** Every case in the tree declared the `strategy` profile, so an engine
|
|
119
|
+
claiming `core` was handed none of them: every case was skipped, the runner
|
|
120
|
+
printed "Suite passed" and exited zero. The repository's own test asserted that
|
|
121
|
+
outcome against an adapter written to answer no case at all. If you have been
|
|
122
|
+
using a passing suite run as evidence about a `core` engine, it was not one.
|
|
123
|
+
|
|
124
|
+
`core` cases now exist, twenty three at first across `lexical`, `syntax`,
|
|
125
|
+
`static`, `runtime` and `limits`, and fifty two by the end of this entry.
|
|
126
|
+
Nothing in the runner changed to make this work: its rules were already right,
|
|
127
|
+
and what was missing was cases for them to apply to.
|
|
128
|
+
|
|
129
|
+
**An engine reporting `engineOnly` is no longer handed compiler-diagnostic
|
|
130
|
+
cases.** Section 8 of `conformance.md` always said it should not be, and the
|
|
131
|
+
runner did not implement it, which nothing noticed while no such case existed.
|
|
132
|
+
Which categories need a compiler is now a column of section 7's table, read by
|
|
133
|
+
the runner, so a category added without an answer in that column stops the
|
|
134
|
+
suite rather than being handed to an engine with no compiler.
|
|
135
|
+
|
|
136
|
+
**Behaviour that changed under you, first engine.** Read these before upgrading
|
|
137
|
+
a deployment whose numbers you have already checked.
|
|
138
|
+
|
|
139
|
+
- **A `"lookahead"` read in a backtest now reads a higher timeframe bar's final
|
|
140
|
+
value from its first bar**, as `stdlib.md` 15.3 always said. The backtest
|
|
141
|
+
appended bars one at a time, so a lookahead read answered the bucket so far,
|
|
142
|
+
which is the developing reading. Confirmed and developing reads are
|
|
143
|
+
unchanged. A lookahead backtest now looks as smooth as the mode says it will.
|
|
144
|
+
- **Dates before about 1 BCE were one day early.** The day count applied the
|
|
145
|
+
negative era adjustment twice. No modern date moves.
|
|
146
|
+
- **Some input that was accepted is now refused, each with a code and a fix.**
|
|
147
|
+
An `input()` in a field fixed before bar 0 that is not the whole of the value
|
|
148
|
+
is OS3025 (arithmetic, a ternary or a colour call over a setting used to
|
|
149
|
+
compile and then fail inside the emitter). A plot's `style` written from an
|
|
150
|
+
input is OS3026 (it used to be folded silently to its default). A bar handed
|
|
151
|
+
over with no time is OS6025. The chart adapter refuses a second declared grid
|
|
152
|
+
and a band coloured per bar with OS6024 before any bar runs, where it used to
|
|
153
|
+
drop them in silence.
|
|
154
|
+
- **A cell outside its grid is OS4008**, naming the row, the column and the
|
|
155
|
+
grid's shape, where it was the array code OS4004 with a flattened count. A
|
|
156
|
+
name or an array still holding an object deleted earlier warns OS8019.
|
|
157
|
+
- **The editor's hover text for six drawing calls was wrong**: `draw.setFrom`
|
|
158
|
+
said "nothing" and `draw.delete` said "box", because the generator split
|
|
159
|
+
`stdlib.md`'s rows on the pipe inside `line | box`. Fixed at the generator and
|
|
160
|
+
in the pages.
|
|
161
|
+
|
|
162
|
+
**New.**
|
|
163
|
+
|
|
164
|
+
- **`engine.run` takes a history as columns**, one array per field, typed arrays
|
|
165
|
+
included, beside the record form. Over 900,000 one minute bars that held 43 MB
|
|
166
|
+
against 104 MB and peaked at 346 MB of heap against 877 MB.
|
|
167
|
+
`docs/integrating/running-the-engine.md` has the shape.
|
|
168
|
+
- **`importScript`**, from the main entry point, imports a script written in the
|
|
169
|
+
version-annotated chart dialect, versions 5 and 6. Each statement is translated
|
|
170
|
+
with its original meaning, translated with a warning stating the difference,
|
|
171
|
+
or kept as a comment with an error; the output is compiled before it is
|
|
172
|
+
returned. Twelve codes in a new range, OS9001 to OS9012, and a new catalogue
|
|
173
|
+
stage, `import`. `docs/writing/importing-a-script.md` lists what is translated
|
|
174
|
+
and what is refused.
|
|
175
|
+
- **A documentation site.** `npm run site` builds every page of `docs/` and
|
|
176
|
+
`spec/`, and a page per catalogue code, with every address relative.
|
|
177
|
+
`scripts/check-site.mjs` fails the build on a link or anchor that leads
|
|
178
|
+
nowhere.
|
|
179
|
+
- **A conformance badge.** `npm run badge` makes one from a passing result
|
|
180
|
+
document, and refuses anything that is not a pass of the profile it claims.
|
|
181
|
+
The suite revision it names is now the package version and a digest of every
|
|
182
|
+
case file (`conformance.md` section 11), so a result names the exact cases it
|
|
183
|
+
was run against.
|
|
184
|
+
|
|
185
|
+
**If you read the catalogue programmatically**: `spec/errors.json` has 173
|
|
186
|
+
entries, a ninth range, OS9xxx, whose severity is "error or warning", and a
|
|
187
|
+
sixth stage, `import`. OS4008, OS8019, OS3025, OS3026, OS6024 and OS6025 are
|
|
188
|
+
raised; OS6012 is now raised only where a fact cannot default, and a bare read
|
|
189
|
+
of an instrument fact the host did not state is absent.
|
|
190
|
+
|
|
191
|
+
**The suite now measures what it exists for.** Four channels that no engine
|
|
192
|
+
answered now have a definition in `conformance.md` section 4 and an answer from
|
|
193
|
+
both engines: `values`, one value per bar per plot; `log`; `drawings`; and
|
|
194
|
+
`table`. There are 106 cases, 52 `core`, 46 `chart` and 8 `strategy`, and the
|
|
195
|
+
`semantics`, `numerics`, `time`, `surface` and `external` categories hold real
|
|
196
|
+
cases for the first time, each with expected values computed independently of
|
|
197
|
+
both engines. A read of another instrument is served from the case's own
|
|
198
|
+
`bars.<SYMBOL>.csv`. `npm run suite:agree` passes 87 cases between the two
|
|
199
|
+
engines exactly, the other 19 being compiler-diagnostic cases an engine-only
|
|
200
|
+
implementation skips.
|
|
201
|
+
|
|
202
|
+
**The second engine now holds every library entry the first does**, 251 of
|
|
203
|
+
251, checked on every build by `scripts/check-manifests.mjs`: arrays, `print`,
|
|
204
|
+
the calendar, the session calls, drawing objects, grids, and higher timeframe
|
|
205
|
+
and other instrument reads in all three modes. Two disagreements between the
|
|
206
|
+
engines were found by the new cases and settled in the specification: the
|
|
207
|
+
`and` and `or` tables are total (decision 71), and the drawing and grid channels
|
|
208
|
+
have a written shape (decision 72).
|
|
209
|
+
|
|
210
|
+
**The installed Python engine can say what it is.** `python -m openscript
|
|
211
|
+
--describe` read the engine's name and version from `pyproject.toml` beside the
|
|
212
|
+
package, and an install never carries that file, so on every installed copy,
|
|
213
|
+
0.5.0 from the index included, it refused, and no host could run the conformance
|
|
214
|
+
suite against the engine it had actually installed. It now reads the record the
|
|
215
|
+
installer wrote beside the package, and still reads the file in a checkout. A
|
|
216
|
+
`pyproject.toml` above an installed package that names some other project is
|
|
217
|
+
ignored rather than reported as this one, and two installed records beside one
|
|
218
|
+
package, which a broken upgrade leaves, are refused rather than one picked.
|
|
219
|
+
|
|
220
|
+
**The Python engine is published by a workflow.** 0.6.0 is the first version
|
|
221
|
+
uploaded by `release-pypi.yml` rather than by hand. Before anything is uploaded
|
|
222
|
+
it builds the wheel, checks every source module is in it and nothing else is,
|
|
223
|
+
installs it into a fresh interpreter, and loads a program compiled by this
|
|
224
|
+
release's compiler and checks every value. It publishes through trusted
|
|
225
|
+
publishing, with no stored token, and each file on the index carries a signed
|
|
226
|
+
attestation of the workflow run that built it.
|
|
227
|
+
|
|
228
|
+
**What this still does not prove.** Both engines were written in this
|
|
229
|
+
repository, by the same hands, from the same pages. Their agreement is evidence
|
|
230
|
+
about this repository and not yet about the specification: that needs an engine
|
|
231
|
+
written by somebody who has read only the pages, which is the gate of Phase 7
|
|
232
|
+
and cannot be met from inside.
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
10
236
|
## 0.5.0
|
|
11
237
|
|
|
12
238
|
**`pow` has no library vector, and the reason is the same one.** A vector is a
|
package/README.md
CHANGED
|
@@ -26,8 +26,10 @@ execution; see [Phase 6](./ROADMAP.md#phase-6-the-second-engine-and-live-running
|
|
|
26
26
|
|
|
27
27
|
## Status
|
|
28
28
|
|
|
29
|
-
**`0.
|
|
30
|
-
|
|
29
|
+
**`0.7.0` runs studies, backtests strategies, draws a strategy on a chart,
|
|
30
|
+
imports scripts from another chart language, and ships the language
|
|
31
|
+
intelligence an editor needs.** The Python engine is on PyPI
|
|
32
|
+
as `openscript`, at the same version, and the two are released together.
|
|
31
33
|
|
|
32
34
|
What an install gets you today: the compiler, the engine, the chart adapter and
|
|
33
35
|
the backtest. A script compiles in milliseconds in a browser tab and computes,
|
|
@@ -43,6 +45,15 @@ examples on every run rather than asserting it in a page. Two records can be put
|
|
|
43
45
|
beside each other, and a pair over different bars is reported incomparable
|
|
44
46
|
instead of being subtracted into a table that reads like a result.
|
|
45
47
|
|
|
48
|
+
**New in `0.7.0`:** the two engines pass exact numerical comparisons across
|
|
49
|
+
all 116 scalar and stateful numerical signatures. Portable elementary kernels,
|
|
50
|
+
changing-window corrections and checkpoint tests remove confirmed numerical
|
|
51
|
+
deviations. Compiled cases also cover numeric arrays and conversions. Upgrade
|
|
52
|
+
both packages together; source signatures and compiled format remain unchanged.
|
|
53
|
+
See the [numerical audit](./docs/integrating/numerical-audit.md) for measured
|
|
54
|
+
coverage and limitations, and [CHANGELOG.md](./CHANGELOG.md) for results that
|
|
55
|
+
can change after upgrading.
|
|
56
|
+
|
|
46
57
|
What it does **not** do yet, stated plainly because the registry page is the
|
|
47
58
|
first thing a stranger reads:
|
|
48
59
|
|
|
@@ -52,10 +63,9 @@ first thing a stranger reads:
|
|
|
52
63
|
because a backtest works out no running equity to size against. The equity
|
|
53
64
|
curve marks a trade at the size it ended up entering, so a strategy that
|
|
54
65
|
scales in is reported with a drawdown deeper than the account had. A script
|
|
55
|
-
still cannot read its own equity mid-run.
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
already believed.
|
|
66
|
+
still cannot read its own equity mid-run. [`CHANGELOG.md`](./CHANGELOG.md) is
|
|
67
|
+
the full list, release by release, and every item on it is there because
|
|
68
|
+
somebody would otherwise find it inside a report they had already believed.
|
|
59
69
|
- **No editor on screen, and that is the design.** The six headless functions are
|
|
60
70
|
here and resolve as `openalgo-script/editor`: highlight, complete, diagnose,
|
|
61
71
|
hover, signature and format, text in and data out, with no DOM at any tier. The
|
|
@@ -67,22 +77,37 @@ first thing a stranger reads:
|
|
|
67
77
|
The language server that would put the same errors in a desktop editor is the
|
|
68
78
|
rest of Phase 4 and is not written.
|
|
69
79
|
- **No engine anybody else wrote has run the suite, so the portability claim is
|
|
70
|
-
still untested.** The second engine is here: `engine/` holds a complete
|
|
71
|
-
|
|
72
|
-
every build. A run record carries its own
|
|
73
|
-
|
|
80
|
+
still untested.** The second engine is here: `engine/` holds a complete engine
|
|
81
|
+
in Python, published to PyPI as `openscript`, with a test suite of its own,
|
|
82
|
+
and `npm test` runs both on every build. A run record carries its own source
|
|
83
|
+
text rather than only a hash of it (`sourceText` in
|
|
74
84
|
[`src/core/backtest/record.ts`](./src/core/backtest/record.ts)), and
|
|
75
85
|
`caseFilesFrom` in [`src/core/backtest/case.ts`](./src/core/backtest/case.ts)
|
|
76
86
|
writes the files a suite runs from straight out of a record, which is where the
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
87
|
+
strategy cases under [`cases/`](./cases) came from.
|
|
88
|
+
|
|
89
|
+
There are 121 cases now: 67 in the `core` profile, 46 in `chart` and 8 in
|
|
90
|
+
`strategy`. They assert eight of the channels section 4 of
|
|
91
|
+
[`spec/conformance.md`](./spec/conformance.md) defines: diagnostics, a value
|
|
92
|
+
per bar per plot, the log, drawing objects, grid cells, orders, trades and the
|
|
93
|
+
report. Markers, fills, levels, paint and alerts have no case yet, and neither
|
|
94
|
+
engine's adapter answers them. So the `semantics` and
|
|
95
|
+
`numerics` categories, which are the reason the suite exists, now hold real
|
|
96
|
+
cases, each with expected values computed independently of both engines.
|
|
97
|
+
|
|
98
|
+
`npm run suite:agree` reports 102 pass and 19 skipped of 121 between the two
|
|
99
|
+
engines, exactly, the skips being the compiler-diagnostic cases the Python
|
|
100
|
+
engine rightly has no compiler for. The two engines hold the same 251 library
|
|
101
|
+
entries, which a check asks each of them for on every build. What that run
|
|
102
|
+
does not prove is the thing the suite exists for: both engines were written
|
|
103
|
+
in this repository, from the same specification, by the same hands, so their
|
|
104
|
+
agreement is evidence about this repository rather than about the
|
|
105
|
+
specification. Until an engine written by somebody who had only the
|
|
106
|
+
specification passes these cases, portability is a design with one
|
|
107
|
+
corroborating implementation, not a result. That is why no conformance badge
|
|
108
|
+
is shown here, though `npm run badge` will make one for an engine that passes.
|
|
109
|
+
|
|
110
|
+
The version is `0.7.0` rather than `1.0` because of that list. The studies
|
|
86
111
|
surface is the part that is finished, and it is the part to build on.
|
|
87
112
|
|
|
88
113
|
`ROADMAP.md` says what each phase owes before it is allowed to finish. The
|
|
@@ -137,7 +162,11 @@ OpenScript is the opposite of that:
|
|
|
137
162
|
- **Connected.** Designed to route orders through your own broker connection,
|
|
138
163
|
with sandbox testing before live execution. The live runner is planned.
|
|
139
164
|
- **Open.** Apache-2.0, a written specification, and a conformance suite anyone
|
|
140
|
-
can run against their own implementation
|
|
165
|
+
can run against their own implementation: the compiler's diagnostics, the
|
|
166
|
+
runtime errors and limits, the per-bar values, the calendar, drawing objects,
|
|
167
|
+
grids, reads of other timeframes and instruments, and strategy fills and
|
|
168
|
+
reports. [The suite's own page](./spec/conformance.md) says what a pass does
|
|
169
|
+
and does not entitle an implementation to claim.
|
|
141
170
|
|
|
142
171
|
## How it is built
|
|
143
172
|
|
|
@@ -150,8 +179,10 @@ That one decision carries the whole project:
|
|
|
150
179
|
and nothing for a security team to approve.
|
|
151
180
|
2. A server-side engine is a few hundred lines that walk an instruction list,
|
|
152
181
|
not a second implementation of the language.
|
|
153
|
-
3. Anyone can write an engine in any language, and
|
|
154
|
-
the
|
|
182
|
+
3. Anyone can write an engine in any language, and hold it to the conformance
|
|
183
|
+
suite. What the suite reaches today is written down rather than implied: an
|
|
184
|
+
engine claiming the narrowest profile is handed cases and fails if it
|
|
185
|
+
answers none of them, which it was not before the `core` cases existed.
|
|
155
186
|
|
|
156
187
|
One compiler. One compiled format. Many small engines, all of which must agree
|
|
157
188
|
to the last decimal.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/adapters/charts/run.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,EACV,KAAK,EACL,WAAW,EAGX,YAAY,EACZ,IAAI,EAEJ,UAAU,EACV,OAAO,EAEP,KAAK,EACN,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/adapters/charts/run.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,EACV,KAAK,EACL,WAAW,EAGX,YAAY,EACZ,IAAI,EAEJ,UAAU,EACV,OAAO,EAEP,KAAK,EACN,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAW3F,iFAAiF;AACjF,MAAM,WAAW,mBAAmB;IAClC;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACr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OAAO,EAAE,mBAAmB,GAC3B,SAAS,CAmBX;AAED;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CACrB,OAAO,EAAE,eAAe,EACxB,IAAI,EAAE,SAAS,QAAQ,EAAE,EACzB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,aAAa,EACvB,KAAK,EAAE,UAAU,EACjB,GAAG,EAAE,gBAAgB,GAAG,SAAS,EAGjC,QAAQ,EAAE,mBAAmB,GAC5B,SAAS,GAAG,IAAI,CA6ClB;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAG/C"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { load, utcTime } from '../../core/engine/index.js';
|
|
2
2
|
import { hostBar, hostNow, stateFor } from './bars.js';
|
|
3
3
|
import { refused, stopped } from './errors.js';
|
|
4
|
+
import { undrawable } from './undrawable.js';
|
|
4
5
|
import { stationIn, stationOf } from './requests.js';
|
|
5
6
|
import { engineSettings, signatureOf } from './settings.js';
|
|
6
7
|
import { answersFor, needsVenue, routeInto, venueFor } from './venue.js';
|
|
@@ -137,6 +138,11 @@ function start(program, settings, ctx, options, requests, bars) {
|
|
|
137
138
|
const withRoute = simulate
|
|
138
139
|
? { ...options, orders: routeInto(holder) }
|
|
139
140
|
: options;
|
|
141
|
+
// What this chart has no room for is refused before the engine is asked,
|
|
142
|
+
// because a study drawn without it is a study that looks broken.
|
|
143
|
+
const narrower = undrawable(program);
|
|
144
|
+
if (narrower !== undefined)
|
|
145
|
+
throw refused(narrower);
|
|
140
146
|
const loaded = load(program, {
|
|
141
147
|
settings: engineSettings(program, settings),
|
|
142
148
|
host: hostFor(ctx, withRoute, requests),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../../src/adapters/charts/run.ts"],"names":[],"mappings":"AAmCA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAG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AAC;IAC1C,OAAO,CAAC,IAAY,EAAiB,EAAE;QACrC,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;YACxC,OAAO,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAC5D,CAAC;QAAC,MAAM,CAAC;YACP,0EAA0E;YAC1E,uEAAuE;YACvE,uEAAuE;YACvE,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -28,25 +28,12 @@
|
|
|
28
28
|
* direction: a cell nothing was written into is blank, never a zero.
|
|
29
29
|
*
|
|
30
30
|
* **A chart pane holds one grid and the language declares as many as it likes.**
|
|
31
|
-
* The descriptor has one `table` hook,
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* and
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* **What ought to happen is a refusal, and it cannot be written yet.** A study
|
|
38
|
-
* whose second grid never appears is a study with no explanation, so the second
|
|
39
|
-
* `table()` should be refused where it is written, naming the limit. Every
|
|
40
|
-
* diagnostic in this project carries a catalogue code and the catalogue has
|
|
41
|
-
* none for "the chart cannot draw something this study declares"; inventing one
|
|
42
|
-
* here is the one thing that is not allowed, so the gap is reported instead, in
|
|
43
|
-
* `issues/0011-a-second-declared-grid-is-dropped-with-nothing-said.md`, with the
|
|
44
|
-
* sentence it should carry.
|
|
45
|
-
*
|
|
46
|
-
* Until it lands, the drop is at least no longer silent inside this repository:
|
|
47
|
-
* it is recorded in `spec/chart-narrowings.json` with its reason, and
|
|
48
|
-
* `scripts/check-chart-surface.mjs` fails the build if this adapter ever drops
|
|
49
|
-
* anything else a compiled program declares without recording it there.
|
|
31
|
+
* The descriptor has one `table` hook, and merging two grids into it would put
|
|
32
|
+
* cells somewhere the script never asked for. So a program declaring a second
|
|
33
|
+
* grid never reaches this file: `undrawable.ts` refuses it before any bar runs,
|
|
34
|
+
* with OS6024, and this reads the one grid a program that runs can have.
|
|
35
|
+
* `spec/chart-narrowings.json` records the refusal and
|
|
36
|
+
* `scripts/check-chart-surface.mjs` proves it with a study that declares two.
|
|
50
37
|
*/
|
|
51
38
|
import type { CompiledProgram } from '../../core/emit/index.js';
|
|
52
39
|
import type { Grid } from '../../core/engine/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tables.d.ts","sourceRoot":"","sources":["../../../src/adapters/charts/tables.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"tables.d.ts","sourceRoot":"","sources":["../../../src/adapters/charts/tables.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,OAAO,KAAK,EAAE,eAAe,EAAwB,MAAM,0BAA0B,CAAC;AACtF,OAAO,KAAK,EAAE,IAAI,EAAY,MAAM,4BAA4B,CAAC;AAGjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAGV,SAAS,EAEV,MAAM,eAAe,CAAC;AAYvB;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACxB,OAAO,EAAE,eAAe,EACxB,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,SAAS,IAAI,EAAE,GACvB,SAAS,GAAG,IAAI,CAIlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tables.js","sourceRoot":"","sources":["../../../src/adapters/charts/tables.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tables.js","sourceRoot":"","sources":["../../../src/adapters/charts/tables.ts"],"names":[],"mappings":"AAuCA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AASpE,6DAA6D;AAC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1
|
+
{"version":3,"file":"undrawable.d.ts","sourceRoot":"","sources":["../../../src/adapters/charts/undrawable.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAS,MAAM,0BAA0B,CAAC;AAKvE,wBAAgB,UAAU,CAAC,OAAO,EAAE,eAAe,GAAG,UAAU,GAAG,SAAS,CAiB3E"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What this chart cannot draw of what a program declares, refused before a bar.
|
|
3
|
+
*
|
|
4
|
+
* `compiled-program.md` section 11: a host draws what its surface has room for,
|
|
5
|
+
* and refuses what it does not with OS6024 rather than drawing part of a study
|
|
6
|
+
* and saying nothing. Two things a version 1 program can declare have no place
|
|
7
|
+
* on this chart's surface, and both used to be dropped in silence.
|
|
8
|
+
*
|
|
9
|
+
* - **A second grid.** The descriptor has one `table` hook, so one grid reaches
|
|
10
|
+
* a pane. Merging two into it would put cells somewhere the script never
|
|
11
|
+
* asked for, and drawing the first alone is a study whose second panel never
|
|
12
|
+
* appears and whose cells look broken.
|
|
13
|
+
* - **A band colour computed per bar.** The chart's band takes one colour for
|
|
14
|
+
* the whole run and has no channel to point at, so a band whose colour the
|
|
15
|
+
* script computes was drawn in the first plot's colour faded, which is a
|
|
16
|
+
* colour the script did not choose.
|
|
17
|
+
*
|
|
18
|
+
* The compiled program carries no source position for a declaration, so the
|
|
19
|
+
* refusal names the declaration by its title, which is what a reader sees in
|
|
20
|
+
* the legend and the settings dialog, and its span is the load's own.
|
|
21
|
+
*/
|
|
22
|
+
import { diagnosticFor, makeSpan } from '../../core/index.js';
|
|
23
|
+
/** A load refusal has no line of its own: the program is what was refused. */
|
|
24
|
+
const AT_LOAD = makeSpan(0, 0, 0, 0);
|
|
25
|
+
export function undrawable(program) {
|
|
26
|
+
const second = program.outputs.tables[1];
|
|
27
|
+
if (second !== undefined) {
|
|
28
|
+
return diagnosticFor('OS6024', AT_LOAD, {
|
|
29
|
+
what: `the table ${titled(second.title, 'after the first')}, the second grid this study declares`,
|
|
30
|
+
limit: 'a chart pane draws one grid',
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
for (const band of program.outputs.fills) {
|
|
34
|
+
if (band.colorUpChannel !== null || band.colorDownChannel !== null) {
|
|
35
|
+
return diagnosticFor('OS6024', AT_LOAD, {
|
|
36
|
+
what: "a band's colour that is computed per bar",
|
|
37
|
+
limit: "a chart's band takes one colour for the whole run",
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
/** A title as a reader sees it, or a description where it is a setting's. */
|
|
44
|
+
function titled(title, otherwise) {
|
|
45
|
+
return typeof title === 'string' ? `"${title}"` : otherwise;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=undrawable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"undrawable.js","sourceRoot":"","sources":["../../../src/adapters/charts/undrawable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAI9D,8EAA8E;AAC9E,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAErC,MAAM,UAAU,UAAU,CAAC,OAAwB;IACjD,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACzC,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO,aAAa,CAAC,QAAQ,EAAE,OAAO,EAAE;YACtC,IAAI,EAAE,aAAa,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,iBAAiB,CAAC,uCAAuC;YACjG,KAAK,EAAE,6BAA6B;SACrC,CAAC,CAAC;IACL,CAAC;IACD,KAAK,MAAM,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QACzC,IAAI,IAAI,CAAC,cAAc,KAAK,IAAI,IAAI,IAAI,CAAC,gBAAgB,KAAK,IAAI,EAAE,CAAC;YACnE,OAAO,aAAa,CAAC,QAAQ,EAAE,OAAO,EAAE;gBACtC,IAAI,EAAE,0CAA0C;gBAChD,KAAK,EAAE,mDAAmD;aAC3D,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,6EAA6E;AAC7E,SAAS,MAAM,CAAC,KAAY,EAAE,SAAiB;IAC7C,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC;AAC9D,CAAC"}
|
|
@@ -1,16 +1,25 @@
|
|
|
1
1
|
import type { Diagnostic } from '../diagnostics/index.js';
|
|
2
2
|
import type { CompiledProgram } from '../emit/index.js';
|
|
3
|
-
import type { Instrument } from '../engine/index.js';
|
|
3
|
+
import type { Drawing, Grid, Instrument, RequestProvider, Value } from '../engine/index.js';
|
|
4
4
|
import type { RecordedBar, RecordedFrame, RunRecord } from './record.js';
|
|
5
|
+
import type { LogLine } from './walk.js';
|
|
5
6
|
import type { BacktestSettings } from './settings.js';
|
|
6
7
|
/** What a run came to, or why it could not be carried out at all. */
|
|
7
8
|
export type BacktestResult = {
|
|
8
9
|
readonly ok: true;
|
|
9
10
|
readonly record: RunRecord;
|
|
11
|
+
readonly rows?: readonly (readonly Value[])[];
|
|
12
|
+
readonly log?: readonly LogLine[];
|
|
13
|
+
readonly surface?: Surface;
|
|
10
14
|
} | {
|
|
11
15
|
readonly ok: false;
|
|
12
16
|
readonly diagnostic: Diagnostic;
|
|
13
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
|
+
}
|
|
14
23
|
/**
|
|
15
24
|
* The facts of `host-interface.md` 4.1 that the contract does not hold.
|
|
16
25
|
*
|
|
@@ -54,6 +63,32 @@ export interface DriveOptions {
|
|
|
54
63
|
* written into a case that could never make its own expected output.
|
|
55
64
|
*/
|
|
56
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;
|
|
57
92
|
}
|
|
58
93
|
/**
|
|
59
94
|
* One run against a simulated destination, from a compiled program to a record.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drive.d.ts","sourceRoot":"","sources":["../../../src/core/backtest/drive.ts"],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