nexustrade 1.24.0 → 1.27.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.
|
@@ -56,6 +56,7 @@ exports.IndicatorStandardDeviation = IndicatorStandardDeviation;
|
|
|
56
56
|
exports.IndicatorWindowAgo = IndicatorWindowAgo;
|
|
57
57
|
exports.InitialValue = InitialValue;
|
|
58
58
|
exports.InsiderTrades = InsiderTrades;
|
|
59
|
+
exports.InstitutionalHoldings = InstitutionalHoldings;
|
|
59
60
|
exports.IsAsset = IsAsset;
|
|
60
61
|
exports.IsAssetType = IsAssetType;
|
|
61
62
|
exports.IsIndexMember = IsIndexMember;
|
|
@@ -1061,6 +1062,21 @@ function InsiderTrades(asset, metric = "NetValue", role = "Any", windowDays = 90
|
|
|
1061
1062
|
d["windowDays"] = windowDays;
|
|
1062
1063
|
return d;
|
|
1063
1064
|
}
|
|
1065
|
+
/**
|
|
1066
|
+
* InstitutionalHoldings indicator.
|
|
1067
|
+
* @param asset Ticker name (ex. SPY, BTC)
|
|
1068
|
+
* @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
|
|
1069
|
+
* @param metric Managers holding, shares or value held, concentration, or the change since the previous quarter
|
|
1070
|
+
* @param windowDays Read a disclosed period only if its filing became public within this many trailing days
|
|
1071
|
+
*/
|
|
1072
|
+
function InstitutionalHoldings(asset, manager, metric = "HolderCount", windowDays = 180) {
|
|
1073
|
+
const d = { type: "InstitutionalHoldings" };
|
|
1074
|
+
setAsset(d, "targetAsset", asset);
|
|
1075
|
+
d["manager"] = manager;
|
|
1076
|
+
d["metric"] = metric;
|
|
1077
|
+
d["windowDays"] = windowDays;
|
|
1078
|
+
return d;
|
|
1079
|
+
}
|
|
1064
1080
|
/**
|
|
1065
1081
|
* IsAsset indicator.
|
|
1066
1082
|
* @param matchAsset The specific asset to compare against (ex. UPRO, GLD)
|
|
@@ -1628,13 +1644,14 @@ function Plus(left, right) {
|
|
|
1628
1644
|
* PoliticalTrades indicator.
|
|
1629
1645
|
* @param asset Pass CANDIDATE inside a rebalance pipeline to bind each stock.
|
|
1630
1646
|
* @param filer Member full or last name. Pass an empty string for all members.
|
|
1631
|
-
* @param metric Amount-range aggregate, event count,
|
|
1647
|
+
* @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.
|
|
1632
1648
|
* @param windowDays Trailing calendar days measured from when each event became public.
|
|
1633
1649
|
* @param amountBasis Range endpoint used by amount metrics; LowerBound is conservative.
|
|
1634
1650
|
* @param instrument Equity excludes confirmed option disclosures; Option selects them explicitly.
|
|
1635
1651
|
* @param chamber Optional advanced cohort filter; named-member requests should normally use All.
|
|
1652
|
+
* @param memberId Bioguide id such as P000197. Matches exactly and overrides filer, because names collide.
|
|
1636
1653
|
*/
|
|
1637
|
-
function PoliticalTrades(asset, filer, metric = "BuyAmount", windowDays = 90, amountBasis = "LowerBound", instrument = "Equity", chamber = "All") {
|
|
1654
|
+
function PoliticalTrades(asset, filer, metric = "BuyAmount", windowDays = 90, amountBasis = "LowerBound", instrument = "Equity", chamber = "All", memberId = "") {
|
|
1638
1655
|
const d = { type: "PoliticalTrades" };
|
|
1639
1656
|
setAsset(d, "targetAsset", asset);
|
|
1640
1657
|
d["filer"] = filer;
|
|
@@ -1643,6 +1660,7 @@ function PoliticalTrades(asset, filer, metric = "BuyAmount", windowDays = 90, am
|
|
|
1643
1660
|
d["amountBasis"] = amountBasis;
|
|
1644
1661
|
d["instrument"] = instrument;
|
|
1645
1662
|
d["chamber"] = chamber;
|
|
1663
|
+
d["memberId"] = memberId;
|
|
1646
1664
|
return d;
|
|
1647
1665
|
}
|
|
1648
1666
|
/**
|
package/dist/cjs/portfolio.js
CHANGED
|
@@ -74,7 +74,8 @@ function isReadonlyPortfolioPolicy(value) {
|
|
|
74
74
|
(industry.mode === "ALL" || industry.mode === "INCLUDE_ONLY") &&
|
|
75
75
|
(industry.match === "ANY" || industry.match === "ALL") &&
|
|
76
76
|
isStringArray(industry.industries) &&
|
|
77
|
-
stock.missingMarketCapBehavior === "EXCLUDE"
|
|
77
|
+
(stock.missingMarketCapBehavior === "EXCLUDE" ||
|
|
78
|
+
stock.missingMarketCapBehavior === "INCLUDE") &&
|
|
78
79
|
stock.missingIndustryBehavior === "EXCLUDE_WHEN_FILTER_SET" &&
|
|
79
80
|
stock.appliesTo === "DYNAMIC_STOCK_UNIVERSES" &&
|
|
80
81
|
typeof automation.enabled === "boolean" &&
|
|
@@ -981,6 +981,14 @@ export declare function InitialValue(): Indicator;
|
|
|
981
981
|
* @param windowDays Count trades whose filings became public within this many trailing days
|
|
982
982
|
*/
|
|
983
983
|
export declare function InsiderTrades(asset: AssetArg, metric?: "NetValue" | "BuyValue" | "SellValue" | "NetShares" | "BuyCount" | "SellCount" | "DistinctBuyers", role?: "Any" | "Officer" | "Director" | "TenPercentOwner", windowDays?: number): Indicator;
|
|
984
|
+
/**
|
|
985
|
+
* InstitutionalHoldings indicator.
|
|
986
|
+
* @param asset Ticker name (ex. SPY, BTC)
|
|
987
|
+
* @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
|
|
988
|
+
* @param metric Managers holding, shares or value held, concentration, or the change since the previous quarter
|
|
989
|
+
* @param windowDays Read a disclosed period only if its filing became public within this many trailing days
|
|
990
|
+
*/
|
|
991
|
+
export declare function InstitutionalHoldings(asset: AssetArg, manager: string, metric?: "HolderCount" | "TotalShares" | "TotalValue" | "ConcentrationTop5" | "NetShareChange" | "NetHolderChange" | "NewHolders" | "ClosedHolders", windowDays?: number): Indicator;
|
|
984
992
|
/**
|
|
985
993
|
* IsAsset indicator.
|
|
986
994
|
* @param matchAsset The specific asset to compare against (ex. UPRO, GLD)
|
|
@@ -1289,13 +1297,14 @@ export declare function Plus(left: Indicator, right: Indicator): Indicator;
|
|
|
1289
1297
|
* PoliticalTrades indicator.
|
|
1290
1298
|
* @param asset Pass CANDIDATE inside a rebalance pipeline to bind each stock.
|
|
1291
1299
|
* @param filer Member full or last name. Pass an empty string for all members.
|
|
1292
|
-
* @param metric Amount-range aggregate, event count,
|
|
1300
|
+
* @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.
|
|
1293
1301
|
* @param windowDays Trailing calendar days measured from when each event became public.
|
|
1294
1302
|
* @param amountBasis Range endpoint used by amount metrics; LowerBound is conservative.
|
|
1295
1303
|
* @param instrument Equity excludes confirmed option disclosures; Option selects them explicitly.
|
|
1296
1304
|
* @param chamber Optional advanced cohort filter; named-member requests should normally use All.
|
|
1305
|
+
* @param memberId Bioguide id such as P000197. Matches exactly and overrides filer, because names collide.
|
|
1297
1306
|
*/
|
|
1298
|
-
export declare function PoliticalTrades(asset: AssetArg, filer: string, metric?: "NetAmount" | "BuyAmount" | "SellAmount" | "BuyCount" | "SellCount" | "DistinctBuyers", windowDays?: number, amountBasis?: "LowerBound" | "Midpoint" | "UpperBound", instrument?: "Equity" | "Option" | "All", chamber?: "All" | "House" | "Senate"): Indicator;
|
|
1307
|
+
export declare function PoliticalTrades(asset: AssetArg, filer: string, metric?: "NetAmount" | "BuyAmount" | "SellAmount" | "BuyCount" | "SellCount" | "DistinctBuyers" | "Held", windowDays?: number, amountBasis?: "LowerBound" | "Midpoint" | "UpperBound", instrument?: "Equity" | "Option" | "All", chamber?: "All" | "House" | "Senate", memberId?: string): Indicator;
|
|
1299
1308
|
/**
|
|
1300
1309
|
* PortfolioValue indicator.
|
|
1301
1310
|
*/
|
|
@@ -870,6 +870,21 @@ export function InsiderTrades(asset, metric = "NetValue", role = "Any", windowDa
|
|
|
870
870
|
d["windowDays"] = windowDays;
|
|
871
871
|
return d;
|
|
872
872
|
}
|
|
873
|
+
/**
|
|
874
|
+
* InstitutionalHoldings indicator.
|
|
875
|
+
* @param asset Ticker name (ex. SPY, BTC)
|
|
876
|
+
* @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
|
|
877
|
+
* @param metric Managers holding, shares or value held, concentration, or the change since the previous quarter
|
|
878
|
+
* @param windowDays Read a disclosed period only if its filing became public within this many trailing days
|
|
879
|
+
*/
|
|
880
|
+
export function InstitutionalHoldings(asset, manager, metric = "HolderCount", windowDays = 180) {
|
|
881
|
+
const d = { type: "InstitutionalHoldings" };
|
|
882
|
+
setAsset(d, "targetAsset", asset);
|
|
883
|
+
d["manager"] = manager;
|
|
884
|
+
d["metric"] = metric;
|
|
885
|
+
d["windowDays"] = windowDays;
|
|
886
|
+
return d;
|
|
887
|
+
}
|
|
873
888
|
/**
|
|
874
889
|
* IsAsset indicator.
|
|
875
890
|
* @param matchAsset The specific asset to compare against (ex. UPRO, GLD)
|
|
@@ -1437,13 +1452,14 @@ export function Plus(left, right) {
|
|
|
1437
1452
|
* PoliticalTrades indicator.
|
|
1438
1453
|
* @param asset Pass CANDIDATE inside a rebalance pipeline to bind each stock.
|
|
1439
1454
|
* @param filer Member full or last name. Pass an empty string for all members.
|
|
1440
|
-
* @param metric Amount-range aggregate, event count,
|
|
1455
|
+
* @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.
|
|
1441
1456
|
* @param windowDays Trailing calendar days measured from when each event became public.
|
|
1442
1457
|
* @param amountBasis Range endpoint used by amount metrics; LowerBound is conservative.
|
|
1443
1458
|
* @param instrument Equity excludes confirmed option disclosures; Option selects them explicitly.
|
|
1444
1459
|
* @param chamber Optional advanced cohort filter; named-member requests should normally use All.
|
|
1460
|
+
* @param memberId Bioguide id such as P000197. Matches exactly and overrides filer, because names collide.
|
|
1445
1461
|
*/
|
|
1446
|
-
export function PoliticalTrades(asset, filer, metric = "BuyAmount", windowDays = 90, amountBasis = "LowerBound", instrument = "Equity", chamber = "All") {
|
|
1462
|
+
export function PoliticalTrades(asset, filer, metric = "BuyAmount", windowDays = 90, amountBasis = "LowerBound", instrument = "Equity", chamber = "All", memberId = "") {
|
|
1447
1463
|
const d = { type: "PoliticalTrades" };
|
|
1448
1464
|
setAsset(d, "targetAsset", asset);
|
|
1449
1465
|
d["filer"] = filer;
|
|
@@ -1452,6 +1468,7 @@ export function PoliticalTrades(asset, filer, metric = "BuyAmount", windowDays =
|
|
|
1452
1468
|
d["amountBasis"] = amountBasis;
|
|
1453
1469
|
d["instrument"] = instrument;
|
|
1454
1470
|
d["chamber"] = chamber;
|
|
1471
|
+
d["memberId"] = memberId;
|
|
1455
1472
|
return d;
|
|
1456
1473
|
}
|
|
1457
1474
|
/**
|
package/dist/esm/portfolio.d.ts
CHANGED
|
@@ -43,7 +43,8 @@ export interface ReadonlyPortfolioPolicy {
|
|
|
43
43
|
readonly match: "ANY" | "ALL";
|
|
44
44
|
readonly industries: readonly string[];
|
|
45
45
|
};
|
|
46
|
-
|
|
46
|
+
/** INCLUDE keeps names with no known market cap (ETFs, unsized filers); the politician copy bots use it. */
|
|
47
|
+
readonly missingMarketCapBehavior: "EXCLUDE" | "INCLUDE";
|
|
47
48
|
readonly missingIndustryBehavior: "EXCLUDE_WHEN_FILTER_SET";
|
|
48
49
|
readonly appliesTo: "DYNAMIC_STOCK_UNIVERSES";
|
|
49
50
|
};
|
package/dist/esm/portfolio.js
CHANGED
|
@@ -37,7 +37,8 @@ function isReadonlyPortfolioPolicy(value) {
|
|
|
37
37
|
(industry.mode === "ALL" || industry.mode === "INCLUDE_ONLY") &&
|
|
38
38
|
(industry.match === "ANY" || industry.match === "ALL") &&
|
|
39
39
|
isStringArray(industry.industries) &&
|
|
40
|
-
stock.missingMarketCapBehavior === "EXCLUDE"
|
|
40
|
+
(stock.missingMarketCapBehavior === "EXCLUDE" ||
|
|
41
|
+
stock.missingMarketCapBehavior === "INCLUDE") &&
|
|
41
42
|
stock.missingIndustryBehavior === "EXCLUDE_WHEN_FILTER_SET" &&
|
|
42
43
|
stock.appliesTo === "DYNAMIC_STOCK_UNIVERSES" &&
|
|
43
44
|
typeof automation.enabled === "boolean" &&
|