nexustrade 1.3.0 → 1.4.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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.geneUniversePipelineFilter = exports.geneSelectTopLimit = exports.geneDteBracket = exports.geneStrikeDistance = exports.geneOptionDelta = exports.geneStructureKind = exports.geneTakeProfitPct = exports.geneRollTriggerDte = exports.geneDeploymentPct = exports.geneTotalBudgetPct = exports.geneAllocationPct = exports.geneBuyingPowerPct = exports.geneRankSignal = exports.geneEntryCooldownDays = exports.geneExitCondition = exports.geneEntryCondition = void 0;
|
|
3
|
+
exports.portfolio = exports.sessionFlatten = exports.strategy = exports.closeOption = exports.greeksTrigger = exports.daysHeldTrigger = exports.dteTrigger = exports.pnlTrigger = exports.rebalanceOption = exports.sleeve = exports.structureTemplate = exports.openOption = exports.againstParent = exports.optionsBuilder = exports.leg = exports.dynamicRebalance = exports.launchAgent = exports.alert = exports.sell = exports.buy = exports.selectPercentile = exports.selectTop = exports.filter = exports.RebalanceNetBenefit = exports.RebalanceExpectedBenefit = exports.RebalanceEstimatedCost = exports.RebalancePlannedTurnover = exports.RebalanceAllocationDrift = exports.volatilityTarget = exports.maximumDiversificationAllocation = exports.riskParityAllocation = exports.meanVarianceAllocation = exports.always = exports.multi = exports.exactly = exports.fewerThan = exports.atMost = exports.atLeast = exports.or = exports.and = exports.neq = exports.eq = exports.lte = exports.gte = exports.lt = exports.gt = exports.cryptoAsset = exports.stockAsset = exports.PORTFOLIO_WIDE = exports.CANDIDATE = void 0;
|
|
4
|
+
exports.geneUniversePipelineFilter = exports.geneSelectTopLimit = exports.geneDteBracket = exports.geneStrikeDistance = exports.geneOptionDelta = exports.geneExposurePolicy = exports.geneAllocationPolicy = exports.geneStructureKind = exports.geneTakeProfitPct = exports.geneRollTriggerDte = exports.geneDeploymentPct = exports.geneTotalBudgetPct = exports.geneAllocationPct = exports.geneBuyingPowerPct = exports.geneRankSignal = exports.geneEntryCooldownDays = exports.geneExitCondition = exports.geneEntryCondition = exports.geneSubject = exports.optimization = exports.walkForward = exports.backtest = exports.SMA = exports.RSI = exports.PriceStdDev = exports.EMA = exports.BBand = void 0;
|
|
5
5
|
exports.universe = universe;
|
|
6
6
|
exports.AbsoluteValue = AbsoluteValue;
|
|
7
7
|
exports.AverageTrueRange = AverageTrueRange;
|
|
@@ -97,6 +97,7 @@ exports.PriceChangeSinceOpen = PriceChangeSinceOpen;
|
|
|
97
97
|
exports.PriceMeanAbsoluteDeviation = PriceMeanAbsoluteDeviation;
|
|
98
98
|
exports.PriceRateOfChange = PriceRateOfChange;
|
|
99
99
|
exports.PriceStandardDeviation = PriceStandardDeviation;
|
|
100
|
+
exports.RebalanceDecisionMetric = RebalanceDecisionMetric;
|
|
100
101
|
exports.RelativeStrengthIndex = RelativeStrengthIndex;
|
|
101
102
|
exports.SimpleMovingAverage = SimpleMovingAverage;
|
|
102
103
|
exports.SquareRoot = SquareRoot;
|
|
@@ -257,6 +258,59 @@ exports.multi = multi;
|
|
|
257
258
|
/** Always-true gate for strategies whose cadence lives in the pipeline. */
|
|
258
259
|
const always = () => compare(Value(1), Value(0), "greaterThan");
|
|
259
260
|
exports.always = always;
|
|
261
|
+
const meanVarianceAllocation = (config = {}) => ({
|
|
262
|
+
type: "MeanVariance",
|
|
263
|
+
lookbackPeriods: 252,
|
|
264
|
+
minimumObservations: 60,
|
|
265
|
+
riskAversion: 4,
|
|
266
|
+
expectedReturnShrinkage: 0.5,
|
|
267
|
+
covarianceShrinkage: 0.25,
|
|
268
|
+
turnoverPenalty: 1,
|
|
269
|
+
estimatedTransactionCostBps: 10,
|
|
270
|
+
...config,
|
|
271
|
+
});
|
|
272
|
+
exports.meanVarianceAllocation = meanVarianceAllocation;
|
|
273
|
+
const riskParityAllocation = (config = {}) => ({
|
|
274
|
+
type: "RiskParity",
|
|
275
|
+
lookbackPeriods: 252,
|
|
276
|
+
minimumObservations: 60,
|
|
277
|
+
covarianceShrinkage: 0.25,
|
|
278
|
+
turnoverPenalty: 1,
|
|
279
|
+
estimatedTransactionCostBps: 10,
|
|
280
|
+
...config,
|
|
281
|
+
});
|
|
282
|
+
exports.riskParityAllocation = riskParityAllocation;
|
|
283
|
+
const maximumDiversificationAllocation = (config = {}) => ({
|
|
284
|
+
type: "MaximumDiversification",
|
|
285
|
+
lookbackPeriods: 252,
|
|
286
|
+
minimumObservations: 60,
|
|
287
|
+
covarianceShrinkage: 0.25,
|
|
288
|
+
turnoverPenalty: 1,
|
|
289
|
+
estimatedTransactionCostBps: 10,
|
|
290
|
+
...config,
|
|
291
|
+
});
|
|
292
|
+
exports.maximumDiversificationAllocation = maximumDiversificationAllocation;
|
|
293
|
+
const volatilityTarget = (config = {}) => ({
|
|
294
|
+
type: "VolatilityTarget",
|
|
295
|
+
lookbackPeriods: 60,
|
|
296
|
+
minimumObservations: 20,
|
|
297
|
+
covarianceShrinkage: 0.25,
|
|
298
|
+
targetAnnualizedVolatilityPercent: 12,
|
|
299
|
+
estimatedTransactionCostBps: 10,
|
|
300
|
+
...config,
|
|
301
|
+
});
|
|
302
|
+
exports.volatilityTarget = volatilityTarget;
|
|
303
|
+
const rebalanceDecisionMetric = (metric) => ({ type: "RebalanceDecisionMetric", metric });
|
|
304
|
+
const RebalanceAllocationDrift = () => rebalanceDecisionMetric("allocationDrift");
|
|
305
|
+
exports.RebalanceAllocationDrift = RebalanceAllocationDrift;
|
|
306
|
+
const RebalancePlannedTurnover = () => rebalanceDecisionMetric("plannedTurnover");
|
|
307
|
+
exports.RebalancePlannedTurnover = RebalancePlannedTurnover;
|
|
308
|
+
const RebalanceEstimatedCost = () => rebalanceDecisionMetric("estimatedCost");
|
|
309
|
+
exports.RebalanceEstimatedCost = RebalanceEstimatedCost;
|
|
310
|
+
const RebalanceExpectedBenefit = () => rebalanceDecisionMetric("expectedBenefit");
|
|
311
|
+
exports.RebalanceExpectedBenefit = RebalanceExpectedBenefit;
|
|
312
|
+
const RebalanceNetBenefit = () => rebalanceDecisionMetric("netBenefit");
|
|
313
|
+
exports.RebalanceNetBenefit = RebalanceNetBenefit;
|
|
260
314
|
const filter = (condition) => ({ type: "Filter", condition });
|
|
261
315
|
exports.filter = filter;
|
|
262
316
|
const selectTop = (metric, limit, direction = "Highest") => ({ type: "SelectTop", metric, limit, direction });
|
|
@@ -1349,6 +1403,15 @@ function PriceStandardDeviation(asset, length = 30, interval = "Day") {
|
|
|
1349
1403
|
return d;
|
|
1350
1404
|
}
|
|
1351
1405
|
exports.PriceStdDev = PriceStandardDeviation;
|
|
1406
|
+
/**
|
|
1407
|
+
* RebalanceDecisionMetric indicator.
|
|
1408
|
+
* @param metric Reads the prospective plan calculated by DynamicRebalance or RebalanceOption before the strategy condition runs.
|
|
1409
|
+
*/
|
|
1410
|
+
function RebalanceDecisionMetric(metric = "netBenefit") {
|
|
1411
|
+
const d = { type: "RebalanceDecisionMetric" };
|
|
1412
|
+
d["metric"] = metric;
|
|
1413
|
+
return d;
|
|
1414
|
+
}
|
|
1352
1415
|
/**
|
|
1353
1416
|
* RelativeStrengthIndex indicator.
|
|
1354
1417
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
@@ -1659,6 +1722,22 @@ const geneStructureKind = (strategyIndex, values) => ({
|
|
|
1659
1722
|
values: values,
|
|
1660
1723
|
});
|
|
1661
1724
|
exports.geneStructureKind = geneStructureKind;
|
|
1725
|
+
/** Sweep AllocationPolicy (Action scope) over a value set. */
|
|
1726
|
+
const geneAllocationPolicy = (strategyIndex, values) => ({
|
|
1727
|
+
field: "AllocationPolicy",
|
|
1728
|
+
scope: "Action",
|
|
1729
|
+
target: { scope: "Action", field: "AllocationPolicy", strategyIndex },
|
|
1730
|
+
values: values,
|
|
1731
|
+
});
|
|
1732
|
+
exports.geneAllocationPolicy = geneAllocationPolicy;
|
|
1733
|
+
/** Sweep ExposurePolicy (Action scope) over a value set. */
|
|
1734
|
+
const geneExposurePolicy = (strategyIndex, values) => ({
|
|
1735
|
+
field: "ExposurePolicy",
|
|
1736
|
+
scope: "Action",
|
|
1737
|
+
target: { scope: "Action", field: "ExposurePolicy", strategyIndex },
|
|
1738
|
+
values: values,
|
|
1739
|
+
});
|
|
1740
|
+
exports.geneExposurePolicy = geneExposurePolicy;
|
|
1662
1741
|
/** Sweep OptionDelta (OptionLeg scope) over a value set. */
|
|
1663
1742
|
const geneOptionDelta = (strategyIndex, legIndex, values) => ({
|
|
1664
1743
|
field: "OptionDelta",
|
|
@@ -261,6 +261,42 @@ export interface LaunchAgentAction {
|
|
|
261
261
|
skipPlanning: boolean;
|
|
262
262
|
cooldownMinutes?: number;
|
|
263
263
|
}
|
|
264
|
+
export interface MeanVarianceAllocationPolicy {
|
|
265
|
+
type: "MeanVariance";
|
|
266
|
+
lookbackPeriods: number;
|
|
267
|
+
minimumObservations: number;
|
|
268
|
+
riskAversion: number;
|
|
269
|
+
expectedReturnShrinkage: number;
|
|
270
|
+
covarianceShrinkage: number;
|
|
271
|
+
turnoverPenalty: number;
|
|
272
|
+
estimatedTransactionCostBps: number;
|
|
273
|
+
}
|
|
274
|
+
export interface RiskParityAllocationPolicy {
|
|
275
|
+
type: "RiskParity";
|
|
276
|
+
lookbackPeriods: number;
|
|
277
|
+
minimumObservations: number;
|
|
278
|
+
covarianceShrinkage: number;
|
|
279
|
+
turnoverPenalty: number;
|
|
280
|
+
estimatedTransactionCostBps: number;
|
|
281
|
+
}
|
|
282
|
+
export interface MaximumDiversificationAllocationPolicy {
|
|
283
|
+
type: "MaximumDiversification";
|
|
284
|
+
lookbackPeriods: number;
|
|
285
|
+
minimumObservations: number;
|
|
286
|
+
covarianceShrinkage: number;
|
|
287
|
+
turnoverPenalty: number;
|
|
288
|
+
estimatedTransactionCostBps: number;
|
|
289
|
+
}
|
|
290
|
+
export type AllocationPolicy = MeanVarianceAllocationPolicy | RiskParityAllocationPolicy | MaximumDiversificationAllocationPolicy;
|
|
291
|
+
export interface VolatilityTargetExposurePolicy {
|
|
292
|
+
type: "VolatilityTarget";
|
|
293
|
+
lookbackPeriods: number;
|
|
294
|
+
minimumObservations: number;
|
|
295
|
+
covarianceShrinkage: number;
|
|
296
|
+
targetAnnualizedVolatilityPercent: number;
|
|
297
|
+
estimatedTransactionCostBps: number;
|
|
298
|
+
}
|
|
299
|
+
export type ExposurePolicy = VolatilityTargetExposurePolicy;
|
|
264
300
|
/** Book-level sizing is deploymentPercent. totalBudget is RebalanceOption-only and absent by design. */
|
|
265
301
|
export interface DynamicRebalanceAction {
|
|
266
302
|
type: "DynamicRebalance";
|
|
@@ -276,6 +312,8 @@ export interface DynamicRebalanceAction {
|
|
|
276
312
|
* indicator values fail closed (retain). deploymentPercent: 0 overrides.
|
|
277
313
|
*/
|
|
278
314
|
canSell?: Condition | CandidateCondition;
|
|
315
|
+
allocationPolicy?: AllocationPolicy;
|
|
316
|
+
exposurePolicy?: ExposurePolicy;
|
|
279
317
|
}
|
|
280
318
|
/** Book-level sizing is totalBudget. deploymentPercent is DynamicRebalance-only and absent by design. */
|
|
281
319
|
export interface RebalanceOptionAction {
|
|
@@ -289,6 +327,8 @@ export interface RebalanceOptionAction {
|
|
|
289
327
|
perNameAllocation?: OptionAllocation;
|
|
290
328
|
positionScope?: RebalanceOptionPositionScope;
|
|
291
329
|
sleeves?: RebalanceOptionSleeve[];
|
|
330
|
+
allocationPolicy?: AllocationPolicy;
|
|
331
|
+
exposurePolicy?: ExposurePolicy;
|
|
292
332
|
}
|
|
293
333
|
export type OptionParentSelectionSort = "oldest" | "highestPnl" | "nearestExpiry";
|
|
294
334
|
export type ParentStrikeOffset = {
|
|
@@ -411,6 +451,15 @@ export declare const exactly: (count: number, ...conditions: Condition[]) => Con
|
|
|
411
451
|
export declare const multi: (count: number, comparison: Comparator, ...conditions: Condition[]) => Condition;
|
|
412
452
|
/** Always-true gate for strategies whose cadence lives in the pipeline. */
|
|
413
453
|
export declare const always: () => Condition;
|
|
454
|
+
export declare const meanVarianceAllocation: (config?: Partial<Omit<MeanVarianceAllocationPolicy, "type">>) => MeanVarianceAllocationPolicy;
|
|
455
|
+
export declare const riskParityAllocation: (config?: Partial<Omit<RiskParityAllocationPolicy, "type">>) => RiskParityAllocationPolicy;
|
|
456
|
+
export declare const maximumDiversificationAllocation: (config?: Partial<Omit<MaximumDiversificationAllocationPolicy, "type">>) => MaximumDiversificationAllocationPolicy;
|
|
457
|
+
export declare const volatilityTarget: (config?: Partial<Omit<VolatilityTargetExposurePolicy, "type">>) => VolatilityTargetExposurePolicy;
|
|
458
|
+
export declare const RebalanceAllocationDrift: () => Indicator;
|
|
459
|
+
export declare const RebalancePlannedTurnover: () => Indicator;
|
|
460
|
+
export declare const RebalanceEstimatedCost: () => Indicator;
|
|
461
|
+
export declare const RebalanceExpectedBenefit: () => Indicator;
|
|
462
|
+
export declare const RebalanceNetBenefit: () => Indicator;
|
|
414
463
|
export declare const filter: (condition: Condition) => PipelineStage;
|
|
415
464
|
export declare const selectTop: (metric: Indicator, limit: number, direction?: SelectDirection) => PipelineStage;
|
|
416
465
|
export declare const selectPercentile: (metric: Indicator, percentile: number, direction?: SelectDirection) => PipelineStage;
|
|
@@ -437,6 +486,8 @@ export declare const dynamicRebalance: (config: {
|
|
|
437
486
|
deploymentPercent?: number;
|
|
438
487
|
perNameAllocation?: PerNameAllocation;
|
|
439
488
|
canSell?: Condition | CandidateCondition;
|
|
489
|
+
allocationPolicy?: AllocationPolicy;
|
|
490
|
+
exposurePolicy?: ExposurePolicy;
|
|
440
491
|
}) => DynamicRebalanceAction;
|
|
441
492
|
/**
|
|
442
493
|
* One leg of a spread. Distance is signed from ATM; 0 is ATM.
|
|
@@ -485,6 +536,8 @@ export declare const rebalanceOption: (config: {
|
|
|
485
536
|
perNameAllocation?: OptionAllocation;
|
|
486
537
|
positionScope?: RebalanceOptionPositionScope;
|
|
487
538
|
sleeves?: RebalanceOptionSleeve[];
|
|
539
|
+
allocationPolicy?: AllocationPolicy;
|
|
540
|
+
exposurePolicy?: ExposurePolicy;
|
|
488
541
|
}) => RebalanceOptionAction;
|
|
489
542
|
export declare const pnlTrigger: (bounds: {
|
|
490
543
|
minPnlPercent?: number;
|
|
@@ -1079,6 +1132,11 @@ export declare function PriceRateOfChange(asset: AssetArg, length?: number, inte
|
|
|
1079
1132
|
*/
|
|
1080
1133
|
export declare function PriceStandardDeviation(asset: AssetArg, length?: number, interval?: Interval): Indicator;
|
|
1081
1134
|
export declare const PriceStdDev: typeof PriceStandardDeviation;
|
|
1135
|
+
/**
|
|
1136
|
+
* RebalanceDecisionMetric indicator.
|
|
1137
|
+
* @param metric Reads the prospective plan calculated by DynamicRebalance or RebalanceOption before the strategy condition runs.
|
|
1138
|
+
*/
|
|
1139
|
+
export declare function RebalanceDecisionMetric(metric?: "allocationDrift" | "plannedTurnover" | "estimatedCost" | "expectedBenefit" | "netBenefit"): Indicator;
|
|
1082
1140
|
/**
|
|
1083
1141
|
* RelativeStrengthIndex indicator.
|
|
1084
1142
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
@@ -1355,6 +1413,16 @@ export declare const geneRollTriggerDte: (strategyIndex: number, values: number[
|
|
|
1355
1413
|
export declare const geneTakeProfitPct: (strategyIndex: number, values: number[]) => Gene;
|
|
1356
1414
|
/** Sweep StructureKind (Action scope) over a value set. */
|
|
1357
1415
|
export declare const geneStructureKind: (strategyIndex: number, values: string[]) => Gene;
|
|
1416
|
+
/** Sweep AllocationPolicy (Action scope) over a value set. */
|
|
1417
|
+
export declare const geneAllocationPolicy: (strategyIndex: number, values: {
|
|
1418
|
+
label: string;
|
|
1419
|
+
policy: AllocationPolicy;
|
|
1420
|
+
}[]) => Gene;
|
|
1421
|
+
/** Sweep ExposurePolicy (Action scope) over a value set. */
|
|
1422
|
+
export declare const geneExposurePolicy: (strategyIndex: number, values: {
|
|
1423
|
+
label: string;
|
|
1424
|
+
policy: ExposurePolicy;
|
|
1425
|
+
}[]) => Gene;
|
|
1358
1426
|
/** Sweep OptionDelta (OptionLeg scope) over a value set. */
|
|
1359
1427
|
export declare const geneOptionDelta: (strategyIndex: number, legIndex: number, values: number[]) => Gene;
|
|
1360
1428
|
/** Sweep StrikeDistance (OptionLeg scope) over a value set. */
|
|
@@ -129,6 +129,50 @@ export const exactly = (count, ...conditions) => ({ type: "Multi", comparison: "
|
|
|
129
129
|
export const multi = (count, comparison, ...conditions) => ({ type: "Multi", comparison, value: count, conditions });
|
|
130
130
|
/** Always-true gate for strategies whose cadence lives in the pipeline. */
|
|
131
131
|
export const always = () => compare(Value(1), Value(0), "greaterThan");
|
|
132
|
+
export const meanVarianceAllocation = (config = {}) => ({
|
|
133
|
+
type: "MeanVariance",
|
|
134
|
+
lookbackPeriods: 252,
|
|
135
|
+
minimumObservations: 60,
|
|
136
|
+
riskAversion: 4,
|
|
137
|
+
expectedReturnShrinkage: 0.5,
|
|
138
|
+
covarianceShrinkage: 0.25,
|
|
139
|
+
turnoverPenalty: 1,
|
|
140
|
+
estimatedTransactionCostBps: 10,
|
|
141
|
+
...config,
|
|
142
|
+
});
|
|
143
|
+
export const riskParityAllocation = (config = {}) => ({
|
|
144
|
+
type: "RiskParity",
|
|
145
|
+
lookbackPeriods: 252,
|
|
146
|
+
minimumObservations: 60,
|
|
147
|
+
covarianceShrinkage: 0.25,
|
|
148
|
+
turnoverPenalty: 1,
|
|
149
|
+
estimatedTransactionCostBps: 10,
|
|
150
|
+
...config,
|
|
151
|
+
});
|
|
152
|
+
export const maximumDiversificationAllocation = (config = {}) => ({
|
|
153
|
+
type: "MaximumDiversification",
|
|
154
|
+
lookbackPeriods: 252,
|
|
155
|
+
minimumObservations: 60,
|
|
156
|
+
covarianceShrinkage: 0.25,
|
|
157
|
+
turnoverPenalty: 1,
|
|
158
|
+
estimatedTransactionCostBps: 10,
|
|
159
|
+
...config,
|
|
160
|
+
});
|
|
161
|
+
export const volatilityTarget = (config = {}) => ({
|
|
162
|
+
type: "VolatilityTarget",
|
|
163
|
+
lookbackPeriods: 60,
|
|
164
|
+
minimumObservations: 20,
|
|
165
|
+
covarianceShrinkage: 0.25,
|
|
166
|
+
targetAnnualizedVolatilityPercent: 12,
|
|
167
|
+
estimatedTransactionCostBps: 10,
|
|
168
|
+
...config,
|
|
169
|
+
});
|
|
170
|
+
const rebalanceDecisionMetric = (metric) => ({ type: "RebalanceDecisionMetric", metric });
|
|
171
|
+
export const RebalanceAllocationDrift = () => rebalanceDecisionMetric("allocationDrift");
|
|
172
|
+
export const RebalancePlannedTurnover = () => rebalanceDecisionMetric("plannedTurnover");
|
|
173
|
+
export const RebalanceEstimatedCost = () => rebalanceDecisionMetric("estimatedCost");
|
|
174
|
+
export const RebalanceExpectedBenefit = () => rebalanceDecisionMetric("expectedBenefit");
|
|
175
|
+
export const RebalanceNetBenefit = () => rebalanceDecisionMetric("netBenefit");
|
|
132
176
|
export const filter = (condition) => ({ type: "Filter", condition });
|
|
133
177
|
export const selectTop = (metric, limit, direction = "Highest") => ({ type: "SelectTop", metric, limit, direction });
|
|
134
178
|
export const selectPercentile = (metric, percentile, direction = "Highest") => ({ type: "SelectPercentile", metric, percentile, direction });
|
|
@@ -1198,6 +1242,15 @@ export function PriceStandardDeviation(asset, length = 30, interval = "Day") {
|
|
|
1198
1242
|
return d;
|
|
1199
1243
|
}
|
|
1200
1244
|
export const PriceStdDev = PriceStandardDeviation;
|
|
1245
|
+
/**
|
|
1246
|
+
* RebalanceDecisionMetric indicator.
|
|
1247
|
+
* @param metric Reads the prospective plan calculated by DynamicRebalance or RebalanceOption before the strategy condition runs.
|
|
1248
|
+
*/
|
|
1249
|
+
export function RebalanceDecisionMetric(metric = "netBenefit") {
|
|
1250
|
+
const d = { type: "RebalanceDecisionMetric" };
|
|
1251
|
+
d["metric"] = metric;
|
|
1252
|
+
return d;
|
|
1253
|
+
}
|
|
1201
1254
|
/**
|
|
1202
1255
|
* RelativeStrengthIndex indicator.
|
|
1203
1256
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
@@ -1493,6 +1546,20 @@ export const geneStructureKind = (strategyIndex, values) => ({
|
|
|
1493
1546
|
target: { scope: "Action", field: "StructureKind", strategyIndex },
|
|
1494
1547
|
values: values,
|
|
1495
1548
|
});
|
|
1549
|
+
/** Sweep AllocationPolicy (Action scope) over a value set. */
|
|
1550
|
+
export const geneAllocationPolicy = (strategyIndex, values) => ({
|
|
1551
|
+
field: "AllocationPolicy",
|
|
1552
|
+
scope: "Action",
|
|
1553
|
+
target: { scope: "Action", field: "AllocationPolicy", strategyIndex },
|
|
1554
|
+
values: values,
|
|
1555
|
+
});
|
|
1556
|
+
/** Sweep ExposurePolicy (Action scope) over a value set. */
|
|
1557
|
+
export const geneExposurePolicy = (strategyIndex, values) => ({
|
|
1558
|
+
field: "ExposurePolicy",
|
|
1559
|
+
scope: "Action",
|
|
1560
|
+
target: { scope: "Action", field: "ExposurePolicy", strategyIndex },
|
|
1561
|
+
values: values,
|
|
1562
|
+
});
|
|
1496
1563
|
/** Sweep OptionDelta (OptionLeg scope) over a value set. */
|
|
1497
1564
|
export const geneOptionDelta = (strategyIndex, legIndex, values) => ({
|
|
1498
1565
|
field: "OptionDelta",
|