@tradejs/node 3.1.29-beta.261 → 3.1.29-beta.263
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/dist/backtest.js +189 -75
- package/dist/backtest.mjs +3 -3
- package/dist/{chunk-ZZQLTUTP.mjs → chunk-GHSLOJLE.mjs} +195 -69
- package/dist/chunk-JQOLTLEY.mjs +0 -0
- package/dist/{chunk-WGL7XJ3W.mjs → chunk-SKY2HNZU.mjs} +1 -1
- package/dist/{chunk-3BBXGZ7M.mjs → chunk-YR55Q355.mjs} +11 -11
- package/dist/chunk-ZUMUI37V.mjs +0 -0
- package/dist/connectors.mjs +1 -0
- package/dist/diagnostics.d.mts +182 -0
- package/dist/diagnostics.d.ts +182 -0
- package/dist/diagnostics.js +9060 -0
- package/dist/diagnostics.mjs +867 -0
- package/dist/jev.d.mts +64 -69
- package/dist/jev.d.ts +64 -69
- package/dist/jev.js +193 -75
- package/dist/jev.mjs +6 -2
- package/dist/{jevTraining-JYXUVAZG.mjs → jevTraining-J4Y4VCM4.mjs} +1 -1
- package/dist/mcp.d.mts +203 -0
- package/dist/mcp.d.ts +203 -0
- package/dist/mcp.js +9257 -0
- package/dist/mcp.mjs +584 -0
- package/dist/registry.js +189 -75
- package/dist/registry.mjs +4 -3
- package/dist/runtimeDashboard.js +189 -75
- package/dist/runtimeDashboard.mjs +7 -7
- package/dist/runtimeStrategies.js +189 -75
- package/dist/runtimeStrategies.mjs +3 -3
- package/dist/strategies.js +189 -75
- package/dist/strategies.mjs +3 -3
- package/package.json +17 -6
package/dist/jev.d.mts
CHANGED
|
@@ -1,49 +1,93 @@
|
|
|
1
|
-
import { Signal, JevInput, JevGateModel, JevStudyRow, JevDimension, JevConfig, SignalAssessment, JevRecord } from '@tradejs/types';
|
|
1
|
+
import { JevScoreQuestion, Signal, JevInput, JevGateModel, JevStudyRow, JevDimension, JevConfig, SignalAssessment, JevRecord } from '@tradejs/types';
|
|
2
2
|
|
|
3
3
|
/** Only explicitly selected signal-time facts enter the provider request. */
|
|
4
4
|
declare const buildJevInput: (signal: Signal) => JevInput;
|
|
5
5
|
declare const JEV_QUESTIONS: {
|
|
6
|
+
readonly signalStrength: JevScoreQuestion;
|
|
6
7
|
readonly trend: {
|
|
7
8
|
readonly type: "score";
|
|
8
|
-
readonly instructions: "
|
|
9
|
-
readonly criteria:
|
|
9
|
+
readonly instructions: "Rate agreement of market.trendBias and market.swingBias with signal.direction: bull supports LONG, bear supports SHORT; neutral/unknown is inconclusive. No profit prediction.";
|
|
10
|
+
readonly criteria: readonly ["Both oppose.", "One opposes; other inconclusive.", "Biases conflict, or both inconclusive.", "One supports; other inconclusive.", "Both support."];
|
|
10
11
|
};
|
|
11
12
|
readonly swing: {
|
|
12
13
|
readonly type: "score";
|
|
13
|
-
readonly instructions: "
|
|
14
|
-
readonly criteria:
|
|
14
|
+
readonly instructions: "Rate shallow correction using only setup.retracementRatio (correction / preceding impulse). Missing is inconclusive, not favorable.";
|
|
15
|
+
readonly criteria: readonly ["Exceeds impulse (>1).", "Deep (>0.65 to 1).", "Moderate (>0.4 to 0.65), or missing.", "Contained (>0.2 to 0.4).", "Shallow (0 to 0.2)."];
|
|
15
16
|
};
|
|
16
17
|
readonly participation: {
|
|
17
18
|
readonly type: "score";
|
|
18
|
-
readonly instructions: "
|
|
19
|
-
readonly criteria:
|
|
19
|
+
readonly instructions: "Rate activity using only market.volumeRel20 (candle volume / trailing 20-candle mean). Not directional flow; ignore setup volume.";
|
|
20
|
+
readonly criteria: readonly ["Very low (<0.5).", "Below ordinary (0.5 to <0.8).", "Ordinary (0.8 to <1.2), or missing.", "Elevated (1.2 to <2).", "Strong expansion (>=2)."];
|
|
20
21
|
};
|
|
21
22
|
readonly setupParticipation: {
|
|
22
23
|
readonly type: "score";
|
|
23
|
-
readonly instructions: "
|
|
24
|
-
readonly criteria:
|
|
24
|
+
readonly instructions: "Rate consolidation volume contraction using a supplied setup consolidation / preceding impulse volume ratio, e.g. setup.flagToPoleVolumeRatio. Smaller means stronger contraction. Ignore current volume and directional flow; unrelated setup semantics are inconclusive.";
|
|
25
|
+
readonly criteria: readonly ["Exceeds impulse (>1.2).", "No contraction (>0.9 to 1.2).", "Mild (>0.7 to 0.9), or inconclusive.", "Clear (>0.4 to 0.7).", "Strong (0 to 0.4)."];
|
|
25
26
|
};
|
|
26
27
|
readonly extension: {
|
|
27
28
|
readonly type: "score";
|
|
28
|
-
readonly instructions: "
|
|
29
|
-
readonly criteria:
|
|
29
|
+
readonly instructions: "Rate absence of entry extension using only setup.breakoutDistanceAtr (distance past setup boundary in ATR). Stop/target distances are not extension.";
|
|
30
|
+
readonly criteria: readonly ["Extreme (>2 ATR).", "Large (>1 to 2 ATR).", "Moderate (>0.5 to 1 ATR), or missing.", "Small (>0.2 to 0.5 ATR).", "Near boundary (0 to 0.2 ATR)."];
|
|
30
31
|
};
|
|
31
32
|
readonly confirmation: {
|
|
32
33
|
readonly type: "score";
|
|
33
|
-
readonly instructions: "
|
|
34
|
-
readonly criteria:
|
|
34
|
+
readonly instructions: "Rate closed entry candle conviction using entry.directionalBodyAtr (signed toward signal.direction) and entry.directionalCloseLocation (1=favorable extreme). Stage names alone prove neither conviction nor breakout retention.";
|
|
35
|
+
readonly criteria: readonly ["Opposing body AND unfavorable-quarter close.", "Opposing body OR unfavorable-half close.", "Small body (<0.2 ATR), mixed or missing evidence.", "Supporting body (>=0.2 ATR) AND favorable-half close.", "Strong supporting body (>=0.5 ATR) AND favorable-quarter close."];
|
|
35
36
|
};
|
|
36
37
|
readonly setupStrength: {
|
|
37
38
|
readonly type: "score";
|
|
38
|
-
readonly instructions: "
|
|
39
|
-
readonly criteria:
|
|
39
|
+
readonly instructions: "Rate impulse persistence using only supplied setup efficiency (absolute net move / sum of absolute bar moves), e.g. setup.poleEfficiencyRatio. Exclude size, volume, correction and geometry.";
|
|
40
|
+
readonly criteria: readonly ["Highly choppy (<0.2).", "Weak (0.2 to <0.4).", "Mixed (0.4 to <0.6), or missing.", "Clear (0.6 to <0.8).", "Highly persistent (0.8 to 1)."];
|
|
40
41
|
};
|
|
41
42
|
readonly geometry: {
|
|
42
43
|
readonly type: "score";
|
|
43
|
-
readonly instructions: "
|
|
44
|
-
readonly criteria:
|
|
44
|
+
readonly instructions: "Rate fitted consolidation boundaries jointly: geometry.upperR2 and lowerR2 (1=best fit), slopeDivergenceRatio (0=parallel). Use the weaker fit; exclude depth, width, volume and profit. Missing equivalent geometry is inconclusive.";
|
|
45
|
+
readonly criteria: readonly ["Fit <0.5 OR divergence >0.5.", "Fit <0.7 OR divergence >0.3.", "Fit <0.85 OR divergence >0.15, or missing.", "Both fits >=0.85 AND divergence <=0.15.", "Both fits >=0.95 AND divergence <=0.05."];
|
|
45
46
|
};
|
|
46
47
|
};
|
|
48
|
+
declare const questionsForJevInput: (input: JevInput) => {
|
|
49
|
+
[k: string]: JevScoreQuestion | {
|
|
50
|
+
readonly type: "score";
|
|
51
|
+
readonly instructions: "Rate agreement of market.trendBias and market.swingBias with signal.direction: bull supports LONG, bear supports SHORT; neutral/unknown is inconclusive. No profit prediction.";
|
|
52
|
+
readonly criteria: readonly ["Both oppose.", "One opposes; other inconclusive.", "Biases conflict, or both inconclusive.", "One supports; other inconclusive.", "Both support."];
|
|
53
|
+
} | {
|
|
54
|
+
readonly type: "score";
|
|
55
|
+
readonly instructions: "Rate shallow correction using only setup.retracementRatio (correction / preceding impulse). Missing is inconclusive, not favorable.";
|
|
56
|
+
readonly criteria: readonly ["Exceeds impulse (>1).", "Deep (>0.65 to 1).", "Moderate (>0.4 to 0.65), or missing.", "Contained (>0.2 to 0.4).", "Shallow (0 to 0.2)."];
|
|
57
|
+
} | {
|
|
58
|
+
readonly type: "score";
|
|
59
|
+
readonly instructions: "Rate activity using only market.volumeRel20 (candle volume / trailing 20-candle mean). Not directional flow; ignore setup volume.";
|
|
60
|
+
readonly criteria: readonly ["Very low (<0.5).", "Below ordinary (0.5 to <0.8).", "Ordinary (0.8 to <1.2), or missing.", "Elevated (1.2 to <2).", "Strong expansion (>=2)."];
|
|
61
|
+
} | {
|
|
62
|
+
readonly type: "score";
|
|
63
|
+
readonly instructions: "Rate consolidation volume contraction using a supplied setup consolidation / preceding impulse volume ratio, e.g. setup.flagToPoleVolumeRatio. Smaller means stronger contraction. Ignore current volume and directional flow; unrelated setup semantics are inconclusive.";
|
|
64
|
+
readonly criteria: readonly ["Exceeds impulse (>1.2).", "No contraction (>0.9 to 1.2).", "Mild (>0.7 to 0.9), or inconclusive.", "Clear (>0.4 to 0.7).", "Strong (0 to 0.4)."];
|
|
65
|
+
} | {
|
|
66
|
+
readonly type: "score";
|
|
67
|
+
readonly instructions: "Rate absence of entry extension using only setup.breakoutDistanceAtr (distance past setup boundary in ATR). Stop/target distances are not extension.";
|
|
68
|
+
readonly criteria: readonly ["Extreme (>2 ATR).", "Large (>1 to 2 ATR).", "Moderate (>0.5 to 1 ATR), or missing.", "Small (>0.2 to 0.5 ATR).", "Near boundary (0 to 0.2 ATR)."];
|
|
69
|
+
} | {
|
|
70
|
+
readonly type: "score";
|
|
71
|
+
readonly instructions: "Rate closed entry candle conviction using entry.directionalBodyAtr (signed toward signal.direction) and entry.directionalCloseLocation (1=favorable extreme). Stage names alone prove neither conviction nor breakout retention.";
|
|
72
|
+
readonly criteria: readonly ["Opposing body AND unfavorable-quarter close.", "Opposing body OR unfavorable-half close.", "Small body (<0.2 ATR), mixed or missing evidence.", "Supporting body (>=0.2 ATR) AND favorable-half close.", "Strong supporting body (>=0.5 ATR) AND favorable-quarter close."];
|
|
73
|
+
} | {
|
|
74
|
+
readonly type: "score";
|
|
75
|
+
readonly instructions: "Rate impulse persistence using only supplied setup efficiency (absolute net move / sum of absolute bar moves), e.g. setup.poleEfficiencyRatio. Exclude size, volume, correction and geometry.";
|
|
76
|
+
readonly criteria: readonly ["Highly choppy (<0.2).", "Weak (0.2 to <0.4).", "Mixed (0.4 to <0.6), or missing.", "Clear (0.6 to <0.8).", "Highly persistent (0.8 to 1)."];
|
|
77
|
+
} | {
|
|
78
|
+
readonly type: "score";
|
|
79
|
+
readonly instructions: "Rate fitted consolidation boundaries jointly: geometry.upperR2 and lowerR2 (1=best fit), slopeDivergenceRatio (0=parallel). Use the weaker fit; exclude depth, width, volume and profit. Missing equivalent geometry is inconclusive.";
|
|
80
|
+
readonly criteria: readonly ["Fit <0.5 OR divergence >0.5.", "Fit <0.7 OR divergence >0.3.", "Fit <0.85 OR divergence >0.15, or missing.", "Both fits >=0.85 AND divergence <=0.15.", "Both fits >=0.95 AND divergence <=0.05."];
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
/** Identity and full provenance stay in the recording, never in paid state. */
|
|
84
|
+
declare const stateForJevInput: (input: JevInput) => {
|
|
85
|
+
strategy: string;
|
|
86
|
+
facts: any;
|
|
87
|
+
missing: any;
|
|
88
|
+
geometryStatus: "available" | "facts_only" | "absent" | "invalid";
|
|
89
|
+
units: any;
|
|
90
|
+
};
|
|
47
91
|
|
|
48
92
|
declare const validateJevGateModel: (value: unknown) => JevGateModel;
|
|
49
93
|
declare const compareJevGate: (model: JevGateModel, input: JevStudyRow[], minScores?: Partial<Record<JevDimension, number>>) => {
|
|
@@ -154,57 +198,8 @@ declare const trainJevGate: (input: JevStudyRow[], options?: {
|
|
|
154
198
|
};
|
|
155
199
|
};
|
|
156
200
|
};
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
start: number;
|
|
160
|
-
end: number;
|
|
161
|
-
agreement: number;
|
|
162
|
-
teacherOnly: number;
|
|
163
|
-
studentOnly: number;
|
|
164
|
-
dimensionErrors: {
|
|
165
|
-
[k: string]: {
|
|
166
|
-
n: number;
|
|
167
|
-
mae: number | null;
|
|
168
|
-
};
|
|
169
|
-
};
|
|
170
|
-
outcomeScope: string;
|
|
171
|
-
cohorts: {
|
|
172
|
-
[k: string]: {
|
|
173
|
-
core: {
|
|
174
|
-
rows: number;
|
|
175
|
-
knownOutcomes: number;
|
|
176
|
-
pnl: number;
|
|
177
|
-
pnlPerTrade: number | null;
|
|
178
|
-
profitFactor: number | null;
|
|
179
|
-
winRate: number | null;
|
|
180
|
-
};
|
|
181
|
-
baseline: {
|
|
182
|
-
rows: number;
|
|
183
|
-
knownOutcomes: number;
|
|
184
|
-
pnl: number;
|
|
185
|
-
pnlPerTrade: number | null;
|
|
186
|
-
profitFactor: number | null;
|
|
187
|
-
winRate: number | null;
|
|
188
|
-
};
|
|
189
|
-
jev: {
|
|
190
|
-
rows: number;
|
|
191
|
-
knownOutcomes: number;
|
|
192
|
-
pnl: number;
|
|
193
|
-
pnlPerTrade: number | null;
|
|
194
|
-
profitFactor: number | null;
|
|
195
|
-
winRate: number | null;
|
|
196
|
-
};
|
|
197
|
-
local: {
|
|
198
|
-
rows: number;
|
|
199
|
-
knownOutcomes: number;
|
|
200
|
-
pnl: number;
|
|
201
|
-
pnlPerTrade: number | null;
|
|
202
|
-
profitFactor: number | null;
|
|
203
|
-
winRate: number | null;
|
|
204
|
-
};
|
|
205
|
-
};
|
|
206
|
-
};
|
|
207
|
-
};
|
|
201
|
+
partitionScheme: string;
|
|
202
|
+
stabilityRole: string;
|
|
208
203
|
test: {
|
|
209
204
|
rows: number;
|
|
210
205
|
start: number;
|
|
@@ -339,4 +334,4 @@ declare const assessSignalWithJev: ({ signal, config, userName, projectRoot, str
|
|
|
339
334
|
scope?: string;
|
|
340
335
|
}) => Promise<SignalAssessment>;
|
|
341
336
|
|
|
342
|
-
export { JEV_QUESTIONS, assessSignalWithJev, buildJevInput, compareJevGate, evaluateJevInput, resolveJevProvider, trainJevGate, validateJevGateModel };
|
|
337
|
+
export { JEV_QUESTIONS, assessSignalWithJev, buildJevInput, compareJevGate, evaluateJevInput, questionsForJevInput, resolveJevProvider, stateForJevInput, trainJevGate, validateJevGateModel };
|
package/dist/jev.d.ts
CHANGED
|
@@ -1,49 +1,93 @@
|
|
|
1
|
-
import { Signal, JevInput, JevGateModel, JevStudyRow, JevDimension, JevConfig, SignalAssessment, JevRecord } from '@tradejs/types';
|
|
1
|
+
import { JevScoreQuestion, Signal, JevInput, JevGateModel, JevStudyRow, JevDimension, JevConfig, SignalAssessment, JevRecord } from '@tradejs/types';
|
|
2
2
|
|
|
3
3
|
/** Only explicitly selected signal-time facts enter the provider request. */
|
|
4
4
|
declare const buildJevInput: (signal: Signal) => JevInput;
|
|
5
5
|
declare const JEV_QUESTIONS: {
|
|
6
|
+
readonly signalStrength: JevScoreQuestion;
|
|
6
7
|
readonly trend: {
|
|
7
8
|
readonly type: "score";
|
|
8
|
-
readonly instructions: "
|
|
9
|
-
readonly criteria:
|
|
9
|
+
readonly instructions: "Rate agreement of market.trendBias and market.swingBias with signal.direction: bull supports LONG, bear supports SHORT; neutral/unknown is inconclusive. No profit prediction.";
|
|
10
|
+
readonly criteria: readonly ["Both oppose.", "One opposes; other inconclusive.", "Biases conflict, or both inconclusive.", "One supports; other inconclusive.", "Both support."];
|
|
10
11
|
};
|
|
11
12
|
readonly swing: {
|
|
12
13
|
readonly type: "score";
|
|
13
|
-
readonly instructions: "
|
|
14
|
-
readonly criteria:
|
|
14
|
+
readonly instructions: "Rate shallow correction using only setup.retracementRatio (correction / preceding impulse). Missing is inconclusive, not favorable.";
|
|
15
|
+
readonly criteria: readonly ["Exceeds impulse (>1).", "Deep (>0.65 to 1).", "Moderate (>0.4 to 0.65), or missing.", "Contained (>0.2 to 0.4).", "Shallow (0 to 0.2)."];
|
|
15
16
|
};
|
|
16
17
|
readonly participation: {
|
|
17
18
|
readonly type: "score";
|
|
18
|
-
readonly instructions: "
|
|
19
|
-
readonly criteria:
|
|
19
|
+
readonly instructions: "Rate activity using only market.volumeRel20 (candle volume / trailing 20-candle mean). Not directional flow; ignore setup volume.";
|
|
20
|
+
readonly criteria: readonly ["Very low (<0.5).", "Below ordinary (0.5 to <0.8).", "Ordinary (0.8 to <1.2), or missing.", "Elevated (1.2 to <2).", "Strong expansion (>=2)."];
|
|
20
21
|
};
|
|
21
22
|
readonly setupParticipation: {
|
|
22
23
|
readonly type: "score";
|
|
23
|
-
readonly instructions: "
|
|
24
|
-
readonly criteria:
|
|
24
|
+
readonly instructions: "Rate consolidation volume contraction using a supplied setup consolidation / preceding impulse volume ratio, e.g. setup.flagToPoleVolumeRatio. Smaller means stronger contraction. Ignore current volume and directional flow; unrelated setup semantics are inconclusive.";
|
|
25
|
+
readonly criteria: readonly ["Exceeds impulse (>1.2).", "No contraction (>0.9 to 1.2).", "Mild (>0.7 to 0.9), or inconclusive.", "Clear (>0.4 to 0.7).", "Strong (0 to 0.4)."];
|
|
25
26
|
};
|
|
26
27
|
readonly extension: {
|
|
27
28
|
readonly type: "score";
|
|
28
|
-
readonly instructions: "
|
|
29
|
-
readonly criteria:
|
|
29
|
+
readonly instructions: "Rate absence of entry extension using only setup.breakoutDistanceAtr (distance past setup boundary in ATR). Stop/target distances are not extension.";
|
|
30
|
+
readonly criteria: readonly ["Extreme (>2 ATR).", "Large (>1 to 2 ATR).", "Moderate (>0.5 to 1 ATR), or missing.", "Small (>0.2 to 0.5 ATR).", "Near boundary (0 to 0.2 ATR)."];
|
|
30
31
|
};
|
|
31
32
|
readonly confirmation: {
|
|
32
33
|
readonly type: "score";
|
|
33
|
-
readonly instructions: "
|
|
34
|
-
readonly criteria:
|
|
34
|
+
readonly instructions: "Rate closed entry candle conviction using entry.directionalBodyAtr (signed toward signal.direction) and entry.directionalCloseLocation (1=favorable extreme). Stage names alone prove neither conviction nor breakout retention.";
|
|
35
|
+
readonly criteria: readonly ["Opposing body AND unfavorable-quarter close.", "Opposing body OR unfavorable-half close.", "Small body (<0.2 ATR), mixed or missing evidence.", "Supporting body (>=0.2 ATR) AND favorable-half close.", "Strong supporting body (>=0.5 ATR) AND favorable-quarter close."];
|
|
35
36
|
};
|
|
36
37
|
readonly setupStrength: {
|
|
37
38
|
readonly type: "score";
|
|
38
|
-
readonly instructions: "
|
|
39
|
-
readonly criteria:
|
|
39
|
+
readonly instructions: "Rate impulse persistence using only supplied setup efficiency (absolute net move / sum of absolute bar moves), e.g. setup.poleEfficiencyRatio. Exclude size, volume, correction and geometry.";
|
|
40
|
+
readonly criteria: readonly ["Highly choppy (<0.2).", "Weak (0.2 to <0.4).", "Mixed (0.4 to <0.6), or missing.", "Clear (0.6 to <0.8).", "Highly persistent (0.8 to 1)."];
|
|
40
41
|
};
|
|
41
42
|
readonly geometry: {
|
|
42
43
|
readonly type: "score";
|
|
43
|
-
readonly instructions: "
|
|
44
|
-
readonly criteria:
|
|
44
|
+
readonly instructions: "Rate fitted consolidation boundaries jointly: geometry.upperR2 and lowerR2 (1=best fit), slopeDivergenceRatio (0=parallel). Use the weaker fit; exclude depth, width, volume and profit. Missing equivalent geometry is inconclusive.";
|
|
45
|
+
readonly criteria: readonly ["Fit <0.5 OR divergence >0.5.", "Fit <0.7 OR divergence >0.3.", "Fit <0.85 OR divergence >0.15, or missing.", "Both fits >=0.85 AND divergence <=0.15.", "Both fits >=0.95 AND divergence <=0.05."];
|
|
45
46
|
};
|
|
46
47
|
};
|
|
48
|
+
declare const questionsForJevInput: (input: JevInput) => {
|
|
49
|
+
[k: string]: JevScoreQuestion | {
|
|
50
|
+
readonly type: "score";
|
|
51
|
+
readonly instructions: "Rate agreement of market.trendBias and market.swingBias with signal.direction: bull supports LONG, bear supports SHORT; neutral/unknown is inconclusive. No profit prediction.";
|
|
52
|
+
readonly criteria: readonly ["Both oppose.", "One opposes; other inconclusive.", "Biases conflict, or both inconclusive.", "One supports; other inconclusive.", "Both support."];
|
|
53
|
+
} | {
|
|
54
|
+
readonly type: "score";
|
|
55
|
+
readonly instructions: "Rate shallow correction using only setup.retracementRatio (correction / preceding impulse). Missing is inconclusive, not favorable.";
|
|
56
|
+
readonly criteria: readonly ["Exceeds impulse (>1).", "Deep (>0.65 to 1).", "Moderate (>0.4 to 0.65), or missing.", "Contained (>0.2 to 0.4).", "Shallow (0 to 0.2)."];
|
|
57
|
+
} | {
|
|
58
|
+
readonly type: "score";
|
|
59
|
+
readonly instructions: "Rate activity using only market.volumeRel20 (candle volume / trailing 20-candle mean). Not directional flow; ignore setup volume.";
|
|
60
|
+
readonly criteria: readonly ["Very low (<0.5).", "Below ordinary (0.5 to <0.8).", "Ordinary (0.8 to <1.2), or missing.", "Elevated (1.2 to <2).", "Strong expansion (>=2)."];
|
|
61
|
+
} | {
|
|
62
|
+
readonly type: "score";
|
|
63
|
+
readonly instructions: "Rate consolidation volume contraction using a supplied setup consolidation / preceding impulse volume ratio, e.g. setup.flagToPoleVolumeRatio. Smaller means stronger contraction. Ignore current volume and directional flow; unrelated setup semantics are inconclusive.";
|
|
64
|
+
readonly criteria: readonly ["Exceeds impulse (>1.2).", "No contraction (>0.9 to 1.2).", "Mild (>0.7 to 0.9), or inconclusive.", "Clear (>0.4 to 0.7).", "Strong (0 to 0.4)."];
|
|
65
|
+
} | {
|
|
66
|
+
readonly type: "score";
|
|
67
|
+
readonly instructions: "Rate absence of entry extension using only setup.breakoutDistanceAtr (distance past setup boundary in ATR). Stop/target distances are not extension.";
|
|
68
|
+
readonly criteria: readonly ["Extreme (>2 ATR).", "Large (>1 to 2 ATR).", "Moderate (>0.5 to 1 ATR), or missing.", "Small (>0.2 to 0.5 ATR).", "Near boundary (0 to 0.2 ATR)."];
|
|
69
|
+
} | {
|
|
70
|
+
readonly type: "score";
|
|
71
|
+
readonly instructions: "Rate closed entry candle conviction using entry.directionalBodyAtr (signed toward signal.direction) and entry.directionalCloseLocation (1=favorable extreme). Stage names alone prove neither conviction nor breakout retention.";
|
|
72
|
+
readonly criteria: readonly ["Opposing body AND unfavorable-quarter close.", "Opposing body OR unfavorable-half close.", "Small body (<0.2 ATR), mixed or missing evidence.", "Supporting body (>=0.2 ATR) AND favorable-half close.", "Strong supporting body (>=0.5 ATR) AND favorable-quarter close."];
|
|
73
|
+
} | {
|
|
74
|
+
readonly type: "score";
|
|
75
|
+
readonly instructions: "Rate impulse persistence using only supplied setup efficiency (absolute net move / sum of absolute bar moves), e.g. setup.poleEfficiencyRatio. Exclude size, volume, correction and geometry.";
|
|
76
|
+
readonly criteria: readonly ["Highly choppy (<0.2).", "Weak (0.2 to <0.4).", "Mixed (0.4 to <0.6), or missing.", "Clear (0.6 to <0.8).", "Highly persistent (0.8 to 1)."];
|
|
77
|
+
} | {
|
|
78
|
+
readonly type: "score";
|
|
79
|
+
readonly instructions: "Rate fitted consolidation boundaries jointly: geometry.upperR2 and lowerR2 (1=best fit), slopeDivergenceRatio (0=parallel). Use the weaker fit; exclude depth, width, volume and profit. Missing equivalent geometry is inconclusive.";
|
|
80
|
+
readonly criteria: readonly ["Fit <0.5 OR divergence >0.5.", "Fit <0.7 OR divergence >0.3.", "Fit <0.85 OR divergence >0.15, or missing.", "Both fits >=0.85 AND divergence <=0.15.", "Both fits >=0.95 AND divergence <=0.05."];
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
/** Identity and full provenance stay in the recording, never in paid state. */
|
|
84
|
+
declare const stateForJevInput: (input: JevInput) => {
|
|
85
|
+
strategy: string;
|
|
86
|
+
facts: any;
|
|
87
|
+
missing: any;
|
|
88
|
+
geometryStatus: "available" | "facts_only" | "absent" | "invalid";
|
|
89
|
+
units: any;
|
|
90
|
+
};
|
|
47
91
|
|
|
48
92
|
declare const validateJevGateModel: (value: unknown) => JevGateModel;
|
|
49
93
|
declare const compareJevGate: (model: JevGateModel, input: JevStudyRow[], minScores?: Partial<Record<JevDimension, number>>) => {
|
|
@@ -154,57 +198,8 @@ declare const trainJevGate: (input: JevStudyRow[], options?: {
|
|
|
154
198
|
};
|
|
155
199
|
};
|
|
156
200
|
};
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
start: number;
|
|
160
|
-
end: number;
|
|
161
|
-
agreement: number;
|
|
162
|
-
teacherOnly: number;
|
|
163
|
-
studentOnly: number;
|
|
164
|
-
dimensionErrors: {
|
|
165
|
-
[k: string]: {
|
|
166
|
-
n: number;
|
|
167
|
-
mae: number | null;
|
|
168
|
-
};
|
|
169
|
-
};
|
|
170
|
-
outcomeScope: string;
|
|
171
|
-
cohorts: {
|
|
172
|
-
[k: string]: {
|
|
173
|
-
core: {
|
|
174
|
-
rows: number;
|
|
175
|
-
knownOutcomes: number;
|
|
176
|
-
pnl: number;
|
|
177
|
-
pnlPerTrade: number | null;
|
|
178
|
-
profitFactor: number | null;
|
|
179
|
-
winRate: number | null;
|
|
180
|
-
};
|
|
181
|
-
baseline: {
|
|
182
|
-
rows: number;
|
|
183
|
-
knownOutcomes: number;
|
|
184
|
-
pnl: number;
|
|
185
|
-
pnlPerTrade: number | null;
|
|
186
|
-
profitFactor: number | null;
|
|
187
|
-
winRate: number | null;
|
|
188
|
-
};
|
|
189
|
-
jev: {
|
|
190
|
-
rows: number;
|
|
191
|
-
knownOutcomes: number;
|
|
192
|
-
pnl: number;
|
|
193
|
-
pnlPerTrade: number | null;
|
|
194
|
-
profitFactor: number | null;
|
|
195
|
-
winRate: number | null;
|
|
196
|
-
};
|
|
197
|
-
local: {
|
|
198
|
-
rows: number;
|
|
199
|
-
knownOutcomes: number;
|
|
200
|
-
pnl: number;
|
|
201
|
-
pnlPerTrade: number | null;
|
|
202
|
-
profitFactor: number | null;
|
|
203
|
-
winRate: number | null;
|
|
204
|
-
};
|
|
205
|
-
};
|
|
206
|
-
};
|
|
207
|
-
};
|
|
201
|
+
partitionScheme: string;
|
|
202
|
+
stabilityRole: string;
|
|
208
203
|
test: {
|
|
209
204
|
rows: number;
|
|
210
205
|
start: number;
|
|
@@ -339,4 +334,4 @@ declare const assessSignalWithJev: ({ signal, config, userName, projectRoot, str
|
|
|
339
334
|
scope?: string;
|
|
340
335
|
}) => Promise<SignalAssessment>;
|
|
341
336
|
|
|
342
|
-
export { JEV_QUESTIONS, assessSignalWithJev, buildJevInput, compareJevGate, evaluateJevInput, resolveJevProvider, trainJevGate, validateJevGateModel };
|
|
337
|
+
export { JEV_QUESTIONS, assessSignalWithJev, buildJevInput, compareJevGate, evaluateJevInput, questionsForJevInput, resolveJevProvider, stateForJevInput, trainJevGate, validateJevGateModel };
|