Revisión | cfef80f7064cea7cceaabcfc77a7850c049f5190 (tree) |
---|---|
Tiempo | 2024-03-01 17:32:42 |
Autor | Lorenzo Isella <lorenzo.isella@gmai...> |
Commiter | Lorenzo Isella |
I now choose whether to save the latest portfolio data or not.
@@ -13,6 +13,8 @@ | ||
13 | 13 | source("/home/lorenzo/myprojects-hg/R-codes/stat_lib.R") |
14 | 14 | |
15 | 15 | |
16 | +save_portfolio_composition <- 1 ## whether to save the new data or not | |
17 | + | |
16 | 18 | |
17 | 19 | ### flexible products giving earnings |
18 | 20 | fname <- "flexible_position.json" |
@@ -138,6 +140,9 @@ | ||
138 | 140 | mutate(timestamp=as_datetime(timestamp)) |
139 | 141 | |
140 | 142 | |
143 | +## Choose whether to save the data or not. | |
144 | + | |
145 | +if (save_portfolio_composition==1){ | |
141 | 146 | |
142 | 147 | fname <- paste("./history_usdt/portfolio_detailed_", df_global_usdt$timestamp[1], ".csv", |
143 | 148 | sep="") |
@@ -159,7 +164,7 @@ | ||
159 | 164 | |
160 | 165 | save_excel(df_stat1_usdt, "portfolio_summary.xlsx") |
161 | 166 | |
162 | - | |
167 | +} | |
163 | 168 | |
164 | 169 | |
165 | 170 |