nexustrade 3.1.0 → 3.2.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.
|
@@ -789,7 +789,7 @@ function Correlation(operands, length = 60, interval = "Day") {
|
|
|
789
789
|
* Count matching intervals inside a time lookback. The ordinary condition owns comparisons/events. countInterval contributes at most one match per interval; omitted means one unit of the lookback interval. TradingDay skips closed exchange dates.
|
|
790
790
|
* @param condition Ordinary condition whose matching intervals are counted.
|
|
791
791
|
* @param length Lookback length.
|
|
792
|
-
* @param interval Lookback time unit; TradingDay uses observed exchange sessions.
|
|
792
|
+
* @param interval Lookback time unit; TradingDay uses observed exchange sessions and TradingMinute (at most 1439) counts regular-session minutes across closed periods.
|
|
793
793
|
* @param countInterval Count at most once per this interval. Omit for one unit of the lookback interval.
|
|
794
794
|
*/
|
|
795
795
|
function CountTrue(condition, length = 1, interval = "Day", countInterval) {
|
|
@@ -438,10 +438,12 @@ export interface DynamicRebalanceAction {
|
|
|
438
438
|
*/
|
|
439
439
|
canSell?: Condition | CandidateCondition;
|
|
440
440
|
/**
|
|
441
|
-
*
|
|
442
|
-
*
|
|
443
|
-
*
|
|
444
|
-
*
|
|
441
|
+
* Permits negative rebalance targets (equity short legs, whole shares).
|
|
442
|
+
* Backtests and paper assume shares were available to short each morning
|
|
443
|
+
* and accrue a modeled borrow fee. Live deploy needs a brokerage that can
|
|
444
|
+
* short stock (Alpaca, Tradier, TradeStation, Public; margin account);
|
|
445
|
+
* elsewhere deploy is rejected. For a fixed-size short of one stock use
|
|
446
|
+
* short() / cover() instead.
|
|
445
447
|
*/
|
|
446
448
|
allowShorts?: boolean;
|
|
447
449
|
allocationPolicy?: AllocationPolicy;
|
|
@@ -606,7 +608,7 @@ export interface Portfolio {
|
|
|
606
608
|
}
|
|
607
609
|
export type DividendPolicy = "cash" | "reinvest";
|
|
608
610
|
export type AssetType = "Stock" | "Cryptocurrency" | "Option" | "Other";
|
|
609
|
-
export type Interval = "Day" | "Hour" | "Minute" | "TradingDay";
|
|
611
|
+
export type Interval = "Day" | "Hour" | "Minute" | "TradingDay" | "TradingMinute";
|
|
610
612
|
export type Comparator = "lessThan" | "greaterThan" | "lessThanOrEqual" | "greaterThanOrEqual" | "equal" | "notEqual";
|
|
611
613
|
export type SelectDirection = "Highest" | "Lowest";
|
|
612
614
|
export type UniverseSource = "ALL_US_STOCKS" | "SP500" | "NASDAQ100" | "DJIA" | "CRYPTO" | "SPECIFIC_ASSETS" | "WATCHLIST";
|
|
@@ -1023,7 +1025,7 @@ export declare function Correlation(operands: Indicator[], length?: number, inte
|
|
|
1023
1025
|
* Count matching intervals inside a time lookback. The ordinary condition owns comparisons/events. countInterval contributes at most one match per interval; omitted means one unit of the lookback interval. TradingDay skips closed exchange dates.
|
|
1024
1026
|
* @param condition Ordinary condition whose matching intervals are counted.
|
|
1025
1027
|
* @param length Lookback length.
|
|
1026
|
-
* @param interval Lookback time unit; TradingDay uses observed exchange sessions.
|
|
1028
|
+
* @param interval Lookback time unit; TradingDay uses observed exchange sessions and TradingMinute (at most 1439) counts regular-session minutes across closed periods.
|
|
1027
1029
|
* @param countInterval Count at most once per this interval. Omit for one unit of the lookback interval.
|
|
1028
1030
|
*/
|
|
1029
1031
|
export declare function CountTrue(condition: Condition, length?: number, interval?: Interval, countInterval?: {
|
|
@@ -556,7 +556,7 @@ export function Correlation(operands, length = 60, interval = "Day") {
|
|
|
556
556
|
* Count matching intervals inside a time lookback. The ordinary condition owns comparisons/events. countInterval contributes at most one match per interval; omitted means one unit of the lookback interval. TradingDay skips closed exchange dates.
|
|
557
557
|
* @param condition Ordinary condition whose matching intervals are counted.
|
|
558
558
|
* @param length Lookback length.
|
|
559
|
-
* @param interval Lookback time unit; TradingDay uses observed exchange sessions.
|
|
559
|
+
* @param interval Lookback time unit; TradingDay uses observed exchange sessions and TradingMinute (at most 1439) counts regular-session minutes across closed periods.
|
|
560
560
|
* @param countInterval Count at most once per this interval. Omit for one unit of the lookback interval.
|
|
561
561
|
*/
|
|
562
562
|
export function CountTrue(condition, length = 1, interval = "Day", countInterval) {
|