nexustrade 1.29.1 → 1.34.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.
|
@@ -90,6 +90,10 @@ exports.Month = Month;
|
|
|
90
90
|
exports.MovingAverageConvergenceDivergence = MovingAverageConvergenceDivergence;
|
|
91
91
|
exports.Multiply = Multiply;
|
|
92
92
|
exports.Negative = Negative;
|
|
93
|
+
exports.NewInsiderDisclosure = NewInsiderDisclosure;
|
|
94
|
+
exports.NewInstitutionalFiling = NewInstitutionalFiling;
|
|
95
|
+
exports.NewPoliticalDisclosure = NewPoliticalDisclosure;
|
|
96
|
+
exports.NewTradingWeek = NewTradingWeek;
|
|
93
97
|
exports.OnBalanceVolume = OnBalanceVolume;
|
|
94
98
|
exports.OpeningPrice = OpeningPrice;
|
|
95
99
|
exports.OptionCollateral = OptionCollateral;
|
|
@@ -1064,17 +1068,23 @@ function InitialValue() {
|
|
|
1064
1068
|
}
|
|
1065
1069
|
/**
|
|
1066
1070
|
* InsiderTrades indicator.
|
|
1067
|
-
* @param asset
|
|
1068
|
-
* @param
|
|
1069
|
-
* @param
|
|
1070
|
-
* @param
|
|
1071
|
+
* @param asset Pass CANDIDATE in a dynamic rebalance pipeline.
|
|
1072
|
+
* @param ownerCik Exact nonzero SEC reporting owner CIK, up to 10 digits. Omit for aggregate activity.
|
|
1073
|
+
* @param issuerCik Restrict an exact owner to this company CIK; omit to follow them across companies.
|
|
1074
|
+
* @param instrument Disclosed instrument; defaults to Equity. Call/Put, award and acquisition metrics, and budget shares require ownerCik. AwardCount is SEC code A issuer acquisitions, not cash purchases or vested-share proof. Its default Equity bucket includes unresolved restricted units. AcquisitionCount and AcquisitionSharePercent combine public code P purchases with code A issuer acquisitions. Shares use qualifying signal counts across all the owner's tickers.
|
|
1071
1075
|
*/
|
|
1072
|
-
function InsiderTrades(asset, metric
|
|
1076
|
+
function InsiderTrades(asset, metric, role, windowDays, ownerCik, issuerCik, instrument) {
|
|
1073
1077
|
const d = { type: "InsiderTrades" };
|
|
1074
1078
|
setAsset(d, "targetAsset", asset);
|
|
1075
1079
|
d["metric"] = metric;
|
|
1076
1080
|
d["role"] = role;
|
|
1077
1081
|
d["windowDays"] = windowDays;
|
|
1082
|
+
if (ownerCik !== undefined)
|
|
1083
|
+
d["ownerCik"] = ownerCik;
|
|
1084
|
+
if (issuerCik !== undefined)
|
|
1085
|
+
d["issuerCik"] = issuerCik;
|
|
1086
|
+
if (instrument !== undefined)
|
|
1087
|
+
d["instrument"] = instrument;
|
|
1078
1088
|
return d;
|
|
1079
1089
|
}
|
|
1080
1090
|
/**
|
|
@@ -1083,13 +1093,15 @@ function InsiderTrades(asset, metric = "NetValue", role = "Any", windowDays = 90
|
|
|
1083
1093
|
* @param manager Optional: a CIK such as 1067983, or part of a manager's name such as Renaissance Technologies. Leave empty for every manager. A CIK is exact; a name can match several firms
|
|
1084
1094
|
* @param metric Managers holding, shares or value held, concentration, or the change since the previous quarter
|
|
1085
1095
|
* @param windowDays Read a disclosed period only if its filing became public within this many trailing days
|
|
1096
|
+
* @param instrument Calls and puts require an exact manager CIK and its effective public book
|
|
1086
1097
|
*/
|
|
1087
|
-
function InstitutionalHoldings(asset, manager, metric = "HolderCount", windowDays = 180) {
|
|
1098
|
+
function InstitutionalHoldings(asset, manager, metric = "HolderCount", windowDays = 180, instrument = "Equity") {
|
|
1088
1099
|
const d = { type: "InstitutionalHoldings" };
|
|
1089
1100
|
setAsset(d, "targetAsset", asset);
|
|
1090
1101
|
d["manager"] = manager;
|
|
1091
1102
|
d["metric"] = metric;
|
|
1092
1103
|
d["windowDays"] = windowDays;
|
|
1104
|
+
d["instrument"] = instrument;
|
|
1093
1105
|
return d;
|
|
1094
1106
|
}
|
|
1095
1107
|
/**
|
|
@@ -1439,6 +1451,54 @@ function Negative(operand) {
|
|
|
1439
1451
|
d.indicators = [operand];
|
|
1440
1452
|
return d;
|
|
1441
1453
|
}
|
|
1454
|
+
/**
|
|
1455
|
+
* NewInsiderDisclosure indicator.
|
|
1456
|
+
* @param ownerCik Exact SEC reporting owner CIK. Omit for aggregate Form 4 activity.
|
|
1457
|
+
* @param issuerCik Optional company CIK; requires ownerCik.
|
|
1458
|
+
* @param role The reporting owner's role.
|
|
1459
|
+
* @param instrument Call and Put require ownerCik.
|
|
1460
|
+
* @param disclosureAction Which newly public Form 4 action triggers a decision. Award requires ownerCik.
|
|
1461
|
+
*/
|
|
1462
|
+
function NewInsiderDisclosure(ownerCik, issuerCik, role = "Any", instrument = "Equity", disclosureAction = "Any") {
|
|
1463
|
+
const d = { type: "NewInsiderDisclosure" };
|
|
1464
|
+
if (ownerCik !== undefined)
|
|
1465
|
+
d["ownerCik"] = ownerCik;
|
|
1466
|
+
if (issuerCik !== undefined)
|
|
1467
|
+
d["issuerCik"] = issuerCik;
|
|
1468
|
+
d["role"] = role;
|
|
1469
|
+
d["instrument"] = instrument;
|
|
1470
|
+
d["disclosureAction"] = disclosureAction;
|
|
1471
|
+
return d;
|
|
1472
|
+
}
|
|
1473
|
+
/**
|
|
1474
|
+
* NewInstitutionalFiling indicator.
|
|
1475
|
+
* @param manager Exact numeric SEC manager CIK. A new 13F accession, including an amendment, triggers one decision.
|
|
1476
|
+
*/
|
|
1477
|
+
function NewInstitutionalFiling(manager) {
|
|
1478
|
+
const d = { type: "NewInstitutionalFiling" };
|
|
1479
|
+
d["manager"] = manager;
|
|
1480
|
+
return d;
|
|
1481
|
+
}
|
|
1482
|
+
/**
|
|
1483
|
+
* NewPoliticalDisclosure indicator.
|
|
1484
|
+
* @param memberId Exact Bioguide member ID, such as P000197.
|
|
1485
|
+
* @param instrument Equity or option disclosures, never both for a public bot arm.
|
|
1486
|
+
* @param disclosureAction Which newly public trade sides trigger a decision.
|
|
1487
|
+
*/
|
|
1488
|
+
function NewPoliticalDisclosure(memberId, instrument, disclosureAction) {
|
|
1489
|
+
const d = { type: "NewPoliticalDisclosure" };
|
|
1490
|
+
d["memberId"] = memberId;
|
|
1491
|
+
d["instrument"] = instrument;
|
|
1492
|
+
d["disclosureAction"] = disclosureAction;
|
|
1493
|
+
return d;
|
|
1494
|
+
}
|
|
1495
|
+
/**
|
|
1496
|
+
* NewTradingWeek indicator.
|
|
1497
|
+
*/
|
|
1498
|
+
function NewTradingWeek() {
|
|
1499
|
+
const d = { type: "NewTradingWeek" };
|
|
1500
|
+
return d;
|
|
1501
|
+
}
|
|
1442
1502
|
/**
|
|
1443
1503
|
* OnBalanceVolume indicator.
|
|
1444
1504
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
@@ -1678,19 +1738,21 @@ function Plus(left, right) {
|
|
|
1678
1738
|
* @param memberId Bioguide member id, for example P000197. The share uses the member's whole public purchase record.
|
|
1679
1739
|
* @param instrument Which side of the equity/option purchase mix to return, as a percent from 0 to 100.
|
|
1680
1740
|
* @param amountBasis Estimate for disclosed purchase ranges. Midpoint is the default.
|
|
1741
|
+
* @param purchaseScope AllPurchases preserves historical purchase flow. RemainingLots uses surviving purchase costs across identifiable tickers; unknown partial quantities retain their original estimate. Neither is current market value.
|
|
1681
1742
|
*/
|
|
1682
|
-
function PoliticalPurchaseShare(memberId, instrument = "Equity", amountBasis = "Midpoint") {
|
|
1743
|
+
function PoliticalPurchaseShare(memberId, instrument = "Equity", amountBasis = "Midpoint", purchaseScope = "AllPurchases") {
|
|
1683
1744
|
const d = { type: "PoliticalPurchaseShare" };
|
|
1684
1745
|
d["memberId"] = memberId;
|
|
1685
1746
|
d["instrument"] = instrument;
|
|
1686
1747
|
d["amountBasis"] = amountBasis;
|
|
1748
|
+
d["purchaseScope"] = purchaseScope;
|
|
1687
1749
|
return d;
|
|
1688
1750
|
}
|
|
1689
1751
|
/**
|
|
1690
1752
|
* PoliticalTrades indicator.
|
|
1691
1753
|
* @param asset Pass CANDIDATE inside a rebalance pipeline to bind each stock.
|
|
1692
1754
|
* @param filer Member full or last name. Pass an empty string for all members.
|
|
1693
|
-
* @param metric Amount-range aggregate, event count, distinct purchasing members, or Held: 1 while the member still holds the asset (latest public disclosure is a purchase or partial sale), ignoring the window.
|
|
1755
|
+
* @param metric Amount-range aggregate, event count, distinct purchasing members, RemainingBuyAmount (surviving original purchase amounts; ignores window; unknown partial quantities retained), or Held: 1 while the member still holds the asset (latest public disclosure is a purchase or partial sale), ignoring the window.
|
|
1694
1756
|
* @param windowDays Trailing calendar days measured from when each event became public.
|
|
1695
1757
|
* @param amountBasis Range endpoint used by amount metrics; LowerBound is conservative.
|
|
1696
1758
|
* @param instrument Equity excludes confirmed option disclosures; Option selects them explicitly.
|
|
@@ -319,6 +319,7 @@ export interface DynamicRebalanceAction {
|
|
|
319
319
|
weightIndicator: Indicator | CandidateIndicator;
|
|
320
320
|
limit?: number;
|
|
321
321
|
deploymentPercent?: Indicator;
|
|
322
|
+
reserveOptionBudget?: DeploymentBudget;
|
|
322
323
|
perNameAllocation?: PerNameAllocation;
|
|
323
324
|
/**
|
|
324
325
|
* Candidate-bound gate on NON-TARGET FULL EXITS only. Omitted = always sell
|
|
@@ -346,11 +347,15 @@ export interface RebalanceOptionAction {
|
|
|
346
347
|
limit?: number;
|
|
347
348
|
totalBudget?: DeploymentBudget;
|
|
348
349
|
perNameAllocation?: OptionAllocation;
|
|
349
|
-
sizingMode?: "fixedPerName" | "proportionalToWeight";
|
|
350
|
+
sizingMode?: "fixedPerName" | "proportionalToWeight" | "proportionalToWeightWholeContracts";
|
|
350
351
|
positionScope?: RebalanceOptionPositionScope;
|
|
351
352
|
sleeves?: RebalanceOptionSleeve[];
|
|
352
353
|
allocationPolicy?: AllocationPolicy;
|
|
353
354
|
exposurePolicy?: ExposurePolicy;
|
|
355
|
+
/** Simulated option replacement before modeled expiry when no full sale was disclosed. */
|
|
356
|
+
renewBeforeDays?: number;
|
|
357
|
+
/** Revisit continuing public option targets only when another option filing arrives. */
|
|
358
|
+
revisitDisclosedTargets?: boolean;
|
|
354
359
|
}
|
|
355
360
|
export type OptionParentSelectionSort = "oldest" | "highestPnl" | "nearestExpiry";
|
|
356
361
|
export type ParentStrikeOffset = {
|
|
@@ -499,6 +504,9 @@ export type FundamentalMetric = "totalRevenue" | "grossProfit" | "operatingIncom
|
|
|
499
504
|
export type PositionEffect = "open" | "close";
|
|
500
505
|
export type OrderStatus = "Pending" | "Accepted" | "Pending User Approval" | "Canceled" | "Filled" | "Partially Filled";
|
|
501
506
|
export type Side = "Buy" | "Sell";
|
|
507
|
+
export type Role = "Any" | "Officer" | "Director" | "TenPercentOwner";
|
|
508
|
+
export type Instrument = "Equity" | "Call" | "Put";
|
|
509
|
+
export type Instrument2 = "Equity" | "Option";
|
|
502
510
|
export type MinOrMax = "min" | "max";
|
|
503
511
|
export type AmountBasis = "LowerBound" | "Midpoint" | "UpperBound";
|
|
504
512
|
export declare const CANDIDATE: Candidate;
|
|
@@ -579,6 +587,7 @@ export declare const dynamicRebalance: (config: {
|
|
|
579
587
|
weightIndicator: Indicator | CandidateIndicator;
|
|
580
588
|
limit?: number;
|
|
581
589
|
deploymentPercent?: Indicator;
|
|
590
|
+
reserveOptionBudget?: DeploymentBudget;
|
|
582
591
|
perNameAllocation?: PerNameAllocation;
|
|
583
592
|
canSell?: Condition | CandidateCondition;
|
|
584
593
|
allowShorts?: boolean;
|
|
@@ -631,7 +640,7 @@ export declare const rebalanceOption: (config: {
|
|
|
631
640
|
limit?: number;
|
|
632
641
|
totalBudget?: DeploymentBudget;
|
|
633
642
|
perNameAllocation?: OptionAllocation;
|
|
634
|
-
sizingMode?: "fixedPerName" | "proportionalToWeight";
|
|
643
|
+
sizingMode?: "fixedPerName" | "proportionalToWeight" | "proportionalToWeightWholeContracts";
|
|
635
644
|
positionScope?: RebalanceOptionPositionScope;
|
|
636
645
|
sleeves?: RebalanceOptionSleeve[];
|
|
637
646
|
allocationPolicy?: AllocationPolicy;
|
|
@@ -1010,20 +1019,21 @@ export declare function IndicatorWindowAgo(operand: Indicator, length: number, i
|
|
|
1010
1019
|
export declare function InitialValue(): Indicator;
|
|
1011
1020
|
/**
|
|
1012
1021
|
* InsiderTrades indicator.
|
|
1013
|
-
* @param asset
|
|
1014
|
-
* @param
|
|
1015
|
-
* @param
|
|
1016
|
-
* @param
|
|
1022
|
+
* @param asset Pass CANDIDATE in a dynamic rebalance pipeline.
|
|
1023
|
+
* @param ownerCik Exact nonzero SEC reporting owner CIK, up to 10 digits. Omit for aggregate activity.
|
|
1024
|
+
* @param issuerCik Restrict an exact owner to this company CIK; omit to follow them across companies.
|
|
1025
|
+
* @param instrument Disclosed instrument; defaults to Equity. Call/Put, award and acquisition metrics, and budget shares require ownerCik. AwardCount is SEC code A issuer acquisitions, not cash purchases or vested-share proof. Its default Equity bucket includes unresolved restricted units. AcquisitionCount and AcquisitionSharePercent combine public code P purchases with code A issuer acquisitions. Shares use qualifying signal counts across all the owner's tickers.
|
|
1017
1026
|
*/
|
|
1018
|
-
export declare function InsiderTrades(asset: AssetArg, metric
|
|
1027
|
+
export declare function InsiderTrades(asset: AssetArg, metric: "NetValue" | "BuyValue" | "SellValue" | "NetShares" | "BuyCount" | "SellCount" | "AwardCount" | "AcquisitionCount" | "DistinctBuyers" | "PurchaseSharePercent" | "AcquisitionSharePercent", role: Role, windowDays: number, ownerCik?: string, issuerCik?: string, instrument?: Instrument): Indicator;
|
|
1019
1028
|
/**
|
|
1020
1029
|
* InstitutionalHoldings indicator.
|
|
1021
1030
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1022
1031
|
* @param manager Optional: a CIK such as 1067983, or part of a manager's name such as Renaissance Technologies. Leave empty for every manager. A CIK is exact; a name can match several firms
|
|
1023
1032
|
* @param metric Managers holding, shares or value held, concentration, or the change since the previous quarter
|
|
1024
1033
|
* @param windowDays Read a disclosed period only if its filing became public within this many trailing days
|
|
1034
|
+
* @param instrument Calls and puts require an exact manager CIK and its effective public book
|
|
1025
1035
|
*/
|
|
1026
|
-
export declare function InstitutionalHoldings(asset: AssetArg, manager: string, metric?: "HolderCount" | "TotalShares" | "TotalValue" | "ConcentrationTop5" | "NetShareChange" | "NetHolderChange" | "NewHolders" | "ClosedHolders", windowDays?: number): Indicator;
|
|
1036
|
+
export declare function InstitutionalHoldings(asset: AssetArg, manager: string, metric?: "HolderCount" | "TotalShares" | "TotalValue" | "BookSharePercent" | "ConcentrationTop5" | "NetShareChange" | "NetHolderChange" | "NewHolders" | "ClosedHolders", windowDays?: number, instrument?: Instrument): Indicator;
|
|
1027
1037
|
/**
|
|
1028
1038
|
* IsAsset indicator.
|
|
1029
1039
|
* @param matchAsset The specific asset to compare against (ex. UPRO, GLD)
|
|
@@ -1214,6 +1224,31 @@ export declare function Multiply(left: Indicator, right: Indicator): Indicator;
|
|
|
1214
1224
|
* Negative indicator.
|
|
1215
1225
|
*/
|
|
1216
1226
|
export declare function Negative(operand: Indicator): Indicator;
|
|
1227
|
+
/**
|
|
1228
|
+
* NewInsiderDisclosure indicator.
|
|
1229
|
+
* @param ownerCik Exact SEC reporting owner CIK. Omit for aggregate Form 4 activity.
|
|
1230
|
+
* @param issuerCik Optional company CIK; requires ownerCik.
|
|
1231
|
+
* @param role The reporting owner's role.
|
|
1232
|
+
* @param instrument Call and Put require ownerCik.
|
|
1233
|
+
* @param disclosureAction Which newly public Form 4 action triggers a decision. Award requires ownerCik.
|
|
1234
|
+
*/
|
|
1235
|
+
export declare function NewInsiderDisclosure(ownerCik?: string, issuerCik?: string, role?: Role, instrument?: Instrument, disclosureAction?: "Any" | "Purchase" | "Sale" | "Award"): Indicator;
|
|
1236
|
+
/**
|
|
1237
|
+
* NewInstitutionalFiling indicator.
|
|
1238
|
+
* @param manager Exact numeric SEC manager CIK. A new 13F accession, including an amendment, triggers one decision.
|
|
1239
|
+
*/
|
|
1240
|
+
export declare function NewInstitutionalFiling(manager: string): Indicator;
|
|
1241
|
+
/**
|
|
1242
|
+
* NewPoliticalDisclosure indicator.
|
|
1243
|
+
* @param memberId Exact Bioguide member ID, such as P000197.
|
|
1244
|
+
* @param instrument Equity or option disclosures, never both for a public bot arm.
|
|
1245
|
+
* @param disclosureAction Which newly public trade sides trigger a decision.
|
|
1246
|
+
*/
|
|
1247
|
+
export declare function NewPoliticalDisclosure(memberId: string, instrument: Instrument2, disclosureAction: "Any" | "Purchase" | "Sale"): Indicator;
|
|
1248
|
+
/**
|
|
1249
|
+
* NewTradingWeek indicator.
|
|
1250
|
+
*/
|
|
1251
|
+
export declare function NewTradingWeek(): Indicator;
|
|
1217
1252
|
/**
|
|
1218
1253
|
* OnBalanceVolume indicator.
|
|
1219
1254
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
@@ -1343,20 +1378,21 @@ export declare function Plus(left: Indicator, right: Indicator): Indicator;
|
|
|
1343
1378
|
* @param memberId Bioguide member id, for example P000197. The share uses the member's whole public purchase record.
|
|
1344
1379
|
* @param instrument Which side of the equity/option purchase mix to return, as a percent from 0 to 100.
|
|
1345
1380
|
* @param amountBasis Estimate for disclosed purchase ranges. Midpoint is the default.
|
|
1381
|
+
* @param purchaseScope AllPurchases preserves historical purchase flow. RemainingLots uses surviving purchase costs across identifiable tickers; unknown partial quantities retain their original estimate. Neither is current market value.
|
|
1346
1382
|
*/
|
|
1347
|
-
export declare function PoliticalPurchaseShare(memberId: string, instrument?: "
|
|
1383
|
+
export declare function PoliticalPurchaseShare(memberId: string, instrument?: Instrument2, amountBasis?: AmountBasis, purchaseScope?: "AllPurchases" | "RemainingLots"): Indicator;
|
|
1348
1384
|
/**
|
|
1349
1385
|
* PoliticalTrades indicator.
|
|
1350
1386
|
* @param asset Pass CANDIDATE inside a rebalance pipeline to bind each stock.
|
|
1351
1387
|
* @param filer Member full or last name. Pass an empty string for all members.
|
|
1352
|
-
* @param metric Amount-range aggregate, event count, distinct purchasing members, or Held: 1 while the member still holds the asset (latest public disclosure is a purchase or partial sale), ignoring the window.
|
|
1388
|
+
* @param metric Amount-range aggregate, event count, distinct purchasing members, RemainingBuyAmount (surviving original purchase amounts; ignores window; unknown partial quantities retained), or Held: 1 while the member still holds the asset (latest public disclosure is a purchase or partial sale), ignoring the window.
|
|
1353
1389
|
* @param windowDays Trailing calendar days measured from when each event became public.
|
|
1354
1390
|
* @param amountBasis Range endpoint used by amount metrics; LowerBound is conservative.
|
|
1355
1391
|
* @param instrument Equity excludes confirmed option disclosures; Option selects them explicitly.
|
|
1356
1392
|
* @param chamber Optional advanced cohort filter; named-member requests should normally use All.
|
|
1357
1393
|
* @param memberId Bioguide id such as P000197. Matches exactly and overrides filer, because names collide.
|
|
1358
1394
|
*/
|
|
1359
|
-
export declare function PoliticalTrades(asset: AssetArg, filer: string, metric?: "NetAmount" | "BuyAmount" | "SellAmount" | "BuyCount" | "SellCount" | "DistinctBuyers" | "Held", windowDays?: number, amountBasis?: AmountBasis, instrument?: "Equity" | "Option" | "All", chamber?: "All" | "House" | "Senate", memberId?: string): Indicator;
|
|
1395
|
+
export declare function PoliticalTrades(asset: AssetArg, filer: string, metric?: "NetAmount" | "BuyAmount" | "RemainingBuyAmount" | "SellAmount" | "BuyCount" | "SellCount" | "DistinctBuyers" | "Held", windowDays?: number, amountBasis?: AmountBasis, instrument?: "Equity" | "Option" | "All", chamber?: "All" | "House" | "Senate", memberId?: string): Indicator;
|
|
1360
1396
|
/**
|
|
1361
1397
|
* PortfolioValue indicator.
|
|
1362
1398
|
*/
|
|
@@ -868,17 +868,23 @@ export function InitialValue() {
|
|
|
868
868
|
}
|
|
869
869
|
/**
|
|
870
870
|
* InsiderTrades indicator.
|
|
871
|
-
* @param asset
|
|
872
|
-
* @param
|
|
873
|
-
* @param
|
|
874
|
-
* @param
|
|
871
|
+
* @param asset Pass CANDIDATE in a dynamic rebalance pipeline.
|
|
872
|
+
* @param ownerCik Exact nonzero SEC reporting owner CIK, up to 10 digits. Omit for aggregate activity.
|
|
873
|
+
* @param issuerCik Restrict an exact owner to this company CIK; omit to follow them across companies.
|
|
874
|
+
* @param instrument Disclosed instrument; defaults to Equity. Call/Put, award and acquisition metrics, and budget shares require ownerCik. AwardCount is SEC code A issuer acquisitions, not cash purchases or vested-share proof. Its default Equity bucket includes unresolved restricted units. AcquisitionCount and AcquisitionSharePercent combine public code P purchases with code A issuer acquisitions. Shares use qualifying signal counts across all the owner's tickers.
|
|
875
875
|
*/
|
|
876
|
-
export function InsiderTrades(asset, metric
|
|
876
|
+
export function InsiderTrades(asset, metric, role, windowDays, ownerCik, issuerCik, instrument) {
|
|
877
877
|
const d = { type: "InsiderTrades" };
|
|
878
878
|
setAsset(d, "targetAsset", asset);
|
|
879
879
|
d["metric"] = metric;
|
|
880
880
|
d["role"] = role;
|
|
881
881
|
d["windowDays"] = windowDays;
|
|
882
|
+
if (ownerCik !== undefined)
|
|
883
|
+
d["ownerCik"] = ownerCik;
|
|
884
|
+
if (issuerCik !== undefined)
|
|
885
|
+
d["issuerCik"] = issuerCik;
|
|
886
|
+
if (instrument !== undefined)
|
|
887
|
+
d["instrument"] = instrument;
|
|
882
888
|
return d;
|
|
883
889
|
}
|
|
884
890
|
/**
|
|
@@ -887,13 +893,15 @@ export function InsiderTrades(asset, metric = "NetValue", role = "Any", windowDa
|
|
|
887
893
|
* @param manager Optional: a CIK such as 1067983, or part of a manager's name such as Renaissance Technologies. Leave empty for every manager. A CIK is exact; a name can match several firms
|
|
888
894
|
* @param metric Managers holding, shares or value held, concentration, or the change since the previous quarter
|
|
889
895
|
* @param windowDays Read a disclosed period only if its filing became public within this many trailing days
|
|
896
|
+
* @param instrument Calls and puts require an exact manager CIK and its effective public book
|
|
890
897
|
*/
|
|
891
|
-
export function InstitutionalHoldings(asset, manager, metric = "HolderCount", windowDays = 180) {
|
|
898
|
+
export function InstitutionalHoldings(asset, manager, metric = "HolderCount", windowDays = 180, instrument = "Equity") {
|
|
892
899
|
const d = { type: "InstitutionalHoldings" };
|
|
893
900
|
setAsset(d, "targetAsset", asset);
|
|
894
901
|
d["manager"] = manager;
|
|
895
902
|
d["metric"] = metric;
|
|
896
903
|
d["windowDays"] = windowDays;
|
|
904
|
+
d["instrument"] = instrument;
|
|
897
905
|
return d;
|
|
898
906
|
}
|
|
899
907
|
/**
|
|
@@ -1243,6 +1251,54 @@ export function Negative(operand) {
|
|
|
1243
1251
|
d.indicators = [operand];
|
|
1244
1252
|
return d;
|
|
1245
1253
|
}
|
|
1254
|
+
/**
|
|
1255
|
+
* NewInsiderDisclosure indicator.
|
|
1256
|
+
* @param ownerCik Exact SEC reporting owner CIK. Omit for aggregate Form 4 activity.
|
|
1257
|
+
* @param issuerCik Optional company CIK; requires ownerCik.
|
|
1258
|
+
* @param role The reporting owner's role.
|
|
1259
|
+
* @param instrument Call and Put require ownerCik.
|
|
1260
|
+
* @param disclosureAction Which newly public Form 4 action triggers a decision. Award requires ownerCik.
|
|
1261
|
+
*/
|
|
1262
|
+
export function NewInsiderDisclosure(ownerCik, issuerCik, role = "Any", instrument = "Equity", disclosureAction = "Any") {
|
|
1263
|
+
const d = { type: "NewInsiderDisclosure" };
|
|
1264
|
+
if (ownerCik !== undefined)
|
|
1265
|
+
d["ownerCik"] = ownerCik;
|
|
1266
|
+
if (issuerCik !== undefined)
|
|
1267
|
+
d["issuerCik"] = issuerCik;
|
|
1268
|
+
d["role"] = role;
|
|
1269
|
+
d["instrument"] = instrument;
|
|
1270
|
+
d["disclosureAction"] = disclosureAction;
|
|
1271
|
+
return d;
|
|
1272
|
+
}
|
|
1273
|
+
/**
|
|
1274
|
+
* NewInstitutionalFiling indicator.
|
|
1275
|
+
* @param manager Exact numeric SEC manager CIK. A new 13F accession, including an amendment, triggers one decision.
|
|
1276
|
+
*/
|
|
1277
|
+
export function NewInstitutionalFiling(manager) {
|
|
1278
|
+
const d = { type: "NewInstitutionalFiling" };
|
|
1279
|
+
d["manager"] = manager;
|
|
1280
|
+
return d;
|
|
1281
|
+
}
|
|
1282
|
+
/**
|
|
1283
|
+
* NewPoliticalDisclosure indicator.
|
|
1284
|
+
* @param memberId Exact Bioguide member ID, such as P000197.
|
|
1285
|
+
* @param instrument Equity or option disclosures, never both for a public bot arm.
|
|
1286
|
+
* @param disclosureAction Which newly public trade sides trigger a decision.
|
|
1287
|
+
*/
|
|
1288
|
+
export function NewPoliticalDisclosure(memberId, instrument, disclosureAction) {
|
|
1289
|
+
const d = { type: "NewPoliticalDisclosure" };
|
|
1290
|
+
d["memberId"] = memberId;
|
|
1291
|
+
d["instrument"] = instrument;
|
|
1292
|
+
d["disclosureAction"] = disclosureAction;
|
|
1293
|
+
return d;
|
|
1294
|
+
}
|
|
1295
|
+
/**
|
|
1296
|
+
* NewTradingWeek indicator.
|
|
1297
|
+
*/
|
|
1298
|
+
export function NewTradingWeek() {
|
|
1299
|
+
const d = { type: "NewTradingWeek" };
|
|
1300
|
+
return d;
|
|
1301
|
+
}
|
|
1246
1302
|
/**
|
|
1247
1303
|
* OnBalanceVolume indicator.
|
|
1248
1304
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
@@ -1482,19 +1538,21 @@ export function Plus(left, right) {
|
|
|
1482
1538
|
* @param memberId Bioguide member id, for example P000197. The share uses the member's whole public purchase record.
|
|
1483
1539
|
* @param instrument Which side of the equity/option purchase mix to return, as a percent from 0 to 100.
|
|
1484
1540
|
* @param amountBasis Estimate for disclosed purchase ranges. Midpoint is the default.
|
|
1541
|
+
* @param purchaseScope AllPurchases preserves historical purchase flow. RemainingLots uses surviving purchase costs across identifiable tickers; unknown partial quantities retain their original estimate. Neither is current market value.
|
|
1485
1542
|
*/
|
|
1486
|
-
export function PoliticalPurchaseShare(memberId, instrument = "Equity", amountBasis = "Midpoint") {
|
|
1543
|
+
export function PoliticalPurchaseShare(memberId, instrument = "Equity", amountBasis = "Midpoint", purchaseScope = "AllPurchases") {
|
|
1487
1544
|
const d = { type: "PoliticalPurchaseShare" };
|
|
1488
1545
|
d["memberId"] = memberId;
|
|
1489
1546
|
d["instrument"] = instrument;
|
|
1490
1547
|
d["amountBasis"] = amountBasis;
|
|
1548
|
+
d["purchaseScope"] = purchaseScope;
|
|
1491
1549
|
return d;
|
|
1492
1550
|
}
|
|
1493
1551
|
/**
|
|
1494
1552
|
* PoliticalTrades indicator.
|
|
1495
1553
|
* @param asset Pass CANDIDATE inside a rebalance pipeline to bind each stock.
|
|
1496
1554
|
* @param filer Member full or last name. Pass an empty string for all members.
|
|
1497
|
-
* @param metric Amount-range aggregate, event count, distinct purchasing members, or Held: 1 while the member still holds the asset (latest public disclosure is a purchase or partial sale), ignoring the window.
|
|
1555
|
+
* @param metric Amount-range aggregate, event count, distinct purchasing members, RemainingBuyAmount (surviving original purchase amounts; ignores window; unknown partial quantities retained), or Held: 1 while the member still holds the asset (latest public disclosure is a purchase or partial sale), ignoring the window.
|
|
1498
1556
|
* @param windowDays Trailing calendar days measured from when each event became public.
|
|
1499
1557
|
* @param amountBasis Range endpoint used by amount metrics; LowerBound is conservative.
|
|
1500
1558
|
* @param instrument Equity excludes confirmed option disclosures; Option selects them explicitly.
|