fix msci last week
This commit is contained in:
parent
29ec4d4f2c
commit
00687e75f9
@ -58,7 +58,9 @@ function market_performance {
|
|||||||
#local f_back=240
|
#local f_back=240
|
||||||
#[[ $(date +%u) -eq 6 ]] && f_back=1500
|
#[[ $(date +%u) -eq 6 ]] && f_back=1500
|
||||||
#[[ $(date +%u) -eq 7 ]] && f_back=2940
|
#[[ $(date +%u) -eq 7 ]] && f_back=2940
|
||||||
local f_from=$(tail -n 1440 asset-histories/MSCI-WORLD-INDEX.history.csv | grep -v ^[A-Z] | head -n1 | cut -d, -f2)
|
local f_msci_last_date=$(tail -n1 asset-histories/MSCI-WORLD-INDEX.history.csv | cut -d, -f1)
|
||||||
|
local f_from=$(egrep "^$(date -d "${f_msci_last_date} last week" "+%Y-%m-%d %H:" | cut -d, -f1 | tail -n1)" asset-histories/MSCI-WORLD-INDEX.history.csv | head -n1 | cut -d, -f2)
|
||||||
|
[ -z "${f_from}" ] && f_from=$(egrep "^$(date -d "${f_msci_last_date} last week" "+%Y-%m-%d " | cut -d, -f1 | tail -n1)" asset-histories/MSCI-WORLD-INDEX.history.csv | head -n1 | cut -d, -f2)
|
||||||
local f_to=$(tail -n 1 asset-histories/MSCI-WORLD-INDEX.history.csv | cut -d, -f2)
|
local f_to=$(tail -n 1 asset-histories/MSCI-WORLD-INDEX.history.csv | cut -d, -f2)
|
||||||
local f_exchange_rate_diff_percentage=$(g_percentage-diff ${f_from} ${f_to})
|
local f_exchange_rate_diff_percentage=$(g_percentage-diff ${f_from} ${f_to})
|
||||||
#local f_back=10080
|
#local f_back=10080
|
||||||
|
Loading…
Reference in New Issue
Block a user