reportify-sdk 0.3.34 → 0.3.35
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/index.d.mts +11 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +7 -0
- package/dist/index.mjs +7 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -726,6 +726,7 @@ interface BacktestParams {
|
|
|
726
726
|
symbols?: string[];
|
|
727
727
|
filterFormula?: string;
|
|
728
728
|
market?: StockMarket;
|
|
729
|
+
stockType?: 'stock' | 'etf' | 'index' | 'sw';
|
|
729
730
|
entryFormula?: string;
|
|
730
731
|
strategyCode?: string;
|
|
731
732
|
exitFormula?: string;
|
|
@@ -742,6 +743,11 @@ interface BacktestParams {
|
|
|
742
743
|
autoClose?: boolean;
|
|
743
744
|
cheatOnOpen?: boolean;
|
|
744
745
|
signalFactors?: Record<string, string>;
|
|
746
|
+
benchmark?: {
|
|
747
|
+
symbol: string;
|
|
748
|
+
market?: StockMarket;
|
|
749
|
+
stockType?: 'stock' | 'etf' | 'index' | 'sw';
|
|
750
|
+
};
|
|
745
751
|
}
|
|
746
752
|
interface KlineParams {
|
|
747
753
|
symbol: string;
|
|
@@ -790,6 +796,11 @@ interface BacktestUploadParams {
|
|
|
790
796
|
autoClose?: boolean;
|
|
791
797
|
cheatOnOpen?: boolean;
|
|
792
798
|
signalFactors?: Record<string, string>;
|
|
799
|
+
benchmark?: {
|
|
800
|
+
symbol: string;
|
|
801
|
+
market?: StockMarket;
|
|
802
|
+
stockType?: 'stock' | 'etf' | 'index' | 'sw';
|
|
803
|
+
};
|
|
793
804
|
}
|
|
794
805
|
interface BacktestResult {
|
|
795
806
|
success: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -726,6 +726,7 @@ interface BacktestParams {
|
|
|
726
726
|
symbols?: string[];
|
|
727
727
|
filterFormula?: string;
|
|
728
728
|
market?: StockMarket;
|
|
729
|
+
stockType?: 'stock' | 'etf' | 'index' | 'sw';
|
|
729
730
|
entryFormula?: string;
|
|
730
731
|
strategyCode?: string;
|
|
731
732
|
exitFormula?: string;
|
|
@@ -742,6 +743,11 @@ interface BacktestParams {
|
|
|
742
743
|
autoClose?: boolean;
|
|
743
744
|
cheatOnOpen?: boolean;
|
|
744
745
|
signalFactors?: Record<string, string>;
|
|
746
|
+
benchmark?: {
|
|
747
|
+
symbol: string;
|
|
748
|
+
market?: StockMarket;
|
|
749
|
+
stockType?: 'stock' | 'etf' | 'index' | 'sw';
|
|
750
|
+
};
|
|
745
751
|
}
|
|
746
752
|
interface KlineParams {
|
|
747
753
|
symbol: string;
|
|
@@ -790,6 +796,11 @@ interface BacktestUploadParams {
|
|
|
790
796
|
autoClose?: boolean;
|
|
791
797
|
cheatOnOpen?: boolean;
|
|
792
798
|
signalFactors?: Record<string, string>;
|
|
799
|
+
benchmark?: {
|
|
800
|
+
symbol: string;
|
|
801
|
+
market?: StockMarket;
|
|
802
|
+
stockType?: 'stock' | 'etf' | 'index' | 'sw';
|
|
803
|
+
};
|
|
793
804
|
}
|
|
794
805
|
interface BacktestResult {
|
|
795
806
|
success: boolean;
|
package/dist/index.js
CHANGED
|
@@ -958,6 +958,7 @@ var QuantModule = class {
|
|
|
958
958
|
start_date: params.startDate,
|
|
959
959
|
end_date: params.endDate,
|
|
960
960
|
market: params.market || "cn",
|
|
961
|
+
stock_type: params.stockType || "stock",
|
|
961
962
|
initial_cash: params.initialCash ?? 1e5,
|
|
962
963
|
commission: params.commission ?? 0,
|
|
963
964
|
buy_commission: params.buyCommission ?? 0,
|
|
@@ -995,6 +996,9 @@ var QuantModule = class {
|
|
|
995
996
|
if (params.signalFactors !== void 0) {
|
|
996
997
|
body.signal_factors = params.signalFactors;
|
|
997
998
|
}
|
|
999
|
+
if (params.benchmark !== void 0) {
|
|
1000
|
+
body.benchmark = params.benchmark;
|
|
1001
|
+
}
|
|
998
1002
|
return this.client.request("POST", "/v1/quant/backtest", {
|
|
999
1003
|
body
|
|
1000
1004
|
});
|
|
@@ -1082,6 +1086,9 @@ var QuantModule = class {
|
|
|
1082
1086
|
if (params.signalFactors !== void 0) {
|
|
1083
1087
|
formData.append("signal_factors", JSON.stringify(params.signalFactors));
|
|
1084
1088
|
}
|
|
1089
|
+
if (params.benchmark !== void 0) {
|
|
1090
|
+
formData.append("benchmark", JSON.stringify(params.benchmark));
|
|
1091
|
+
}
|
|
1085
1092
|
return this.client.request("POST", "/v1/quant/backtest/upload", {
|
|
1086
1093
|
formData
|
|
1087
1094
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -914,6 +914,7 @@ var QuantModule = class {
|
|
|
914
914
|
start_date: params.startDate,
|
|
915
915
|
end_date: params.endDate,
|
|
916
916
|
market: params.market || "cn",
|
|
917
|
+
stock_type: params.stockType || "stock",
|
|
917
918
|
initial_cash: params.initialCash ?? 1e5,
|
|
918
919
|
commission: params.commission ?? 0,
|
|
919
920
|
buy_commission: params.buyCommission ?? 0,
|
|
@@ -951,6 +952,9 @@ var QuantModule = class {
|
|
|
951
952
|
if (params.signalFactors !== void 0) {
|
|
952
953
|
body.signal_factors = params.signalFactors;
|
|
953
954
|
}
|
|
955
|
+
if (params.benchmark !== void 0) {
|
|
956
|
+
body.benchmark = params.benchmark;
|
|
957
|
+
}
|
|
954
958
|
return this.client.request("POST", "/v1/quant/backtest", {
|
|
955
959
|
body
|
|
956
960
|
});
|
|
@@ -1038,6 +1042,9 @@ var QuantModule = class {
|
|
|
1038
1042
|
if (params.signalFactors !== void 0) {
|
|
1039
1043
|
formData.append("signal_factors", JSON.stringify(params.signalFactors));
|
|
1040
1044
|
}
|
|
1045
|
+
if (params.benchmark !== void 0) {
|
|
1046
|
+
formData.append("benchmark", JSON.stringify(params.benchmark));
|
|
1047
|
+
}
|
|
1041
1048
|
return this.client.request("POST", "/v1/quant/backtest/upload", {
|
|
1042
1049
|
formData
|
|
1043
1050
|
});
|