added dax, nasdaq and dxy from boerse.de
This commit is contained in:
parent
da4cf3b239
commit
c2dd60e021
@ -95,45 +95,13 @@ function get_assets {
|
||||
export csv_headline
|
||||
. /tmp/parallel
|
||||
|
||||
## get MSCI World Index for analysis
|
||||
#echo "wget -q -O - https://www.boerse.de/realtime-kurse/MSCI-World/XC0009692739 | egrep 'itemprop=\"price\" content=\"[0-9]+\.[0-9]+\"' | cut -d\\\" -f6" >MSCI_WORLD_CMD
|
||||
#g_runcmd g_retrycmd sh MSCI_WORLD_CMD >MSCI_WORLD_CMD_OUT.tmp
|
||||
## check output
|
||||
#if [ -s MSCI_WORLD_CMD_OUT.tmp ] && egrep -q "^[0-9]*\.[0-9]+$" MSCI_WORLD_CMD_OUT.tmp
|
||||
#then
|
||||
# if egrep -q "^0\.00$" MSCI_WORLD_CMD_OUT.tmp
|
||||
# then
|
||||
# g_echo_note "Ignoring MSCI World $(tail -n 10 MSCI_WORLD_CMD_OUT.tmp) - maybe out of business day"
|
||||
# else
|
||||
# mv MSCI_WORLD_CMD_OUT.tmp MSCI_WORLD_CMD_OUT
|
||||
# fi
|
||||
#else
|
||||
# g_echo_warn "MSCI_WORLD_CMD_OUT.tmp has wrong Syntax. - Not updating MSCI WORLD Index $(tail -n 10 MSCI_WORLD_CMD_OUT.tmp)"
|
||||
#fi
|
||||
#echo "${f_timestamp},$(cat MSCI_WORLD_CMD_OUT)" >>asset-histories/MSCI-WORLD-INDEX.history.csv
|
||||
#
|
||||
# # get SundP500 Index for analysis
|
||||
# echo "wget -q -O - https://www.boerse.de/indizes/SundP-500/US78378X1072 | egrep 'itemprop=\"price\" content=\"[0-9]+\.[0-9]+\"' | cut -d\\\" -f6" >SP500_CMD
|
||||
# g_runcmd g_retrycmd sh SP500_CMD >SP500_CMD_OUT.tmp
|
||||
# # check output
|
||||
# if [ -s SP500_CMD_OUT.tmp ] && egrep -q "^[0-9]*\.[0-9]+$" SP500_CMD_OUT.tmp
|
||||
# then
|
||||
# if egrep -q "^0\.00$" SP500_CMD_OUT.tmp
|
||||
# then
|
||||
# g_echo_note "Ignoring SP500 $(tail -n 10 SP500_CMD_OUT.tmp) - maybe out of business day"
|
||||
# else
|
||||
# mv SP500_CMD_OUT.tmp SP500_CMD_OUT
|
||||
# fi
|
||||
# else
|
||||
# g_echo_warn "SP500_CMD_OUT.tmp has wrong Syntax. - Not updating SP500 Index $(tail -n 10 SP500_CMD_OUT.tmp)"
|
||||
# fi
|
||||
# echo "${f_timestamp},$(cat SP500_CMD_OUT)" >>asset-histories/SP500-INDEX.history.csv
|
||||
|
||||
get_boerse_de https://www.boerse.de/realtime-kurse/MSCI-World/XC0009692739 MSCI-WORLD-INDEX
|
||||
get_boerse_de https://www.boerse.de/indizes/SundP-500/US78378X1072 SP500-INDEX
|
||||
get_boerse_de https://www.boerse.de/indizes/DJ-AMER-OIL-und-GAS/XC0006886516 OIL-GAS-INDEX
|
||||
get_boerse_de https://www.boerse.de/fonds/SPDR-SundP-Regional-Banking-ETF/US78464A6982 KRE-BANKING-INDEX
|
||||
|
||||
get_boerse_de https://www.boerse.de/indizes/Dax/DE0008469008 DAX-INDEX
|
||||
get_boerse_de https://www.boerse.de/indizes/Nasdaq-100/US6311011026 NASDAQ-INDEX
|
||||
get_boerse_de https://www.boerse.de/devisen/Dollar-Euro/XC0009666410 DXY-INDEX
|
||||
|
||||
}
|
||||
|
||||
|
@ -55,16 +55,11 @@ function market_performance {
|
||||
|
||||
|
||||
# price performance msci world (last week and halved because of the long time)
|
||||
#local f_back=240
|
||||
#[[ $(date +%u) -eq 6 ]] && f_back=1500
|
||||
#[[ $(date +%u) -eq 7 ]] && f_back=2940
|
||||
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_exchange_rate_diff_percentage=$(g_percentage-diff ${f_from} ${f_to})
|
||||
#local f_back=10080
|
||||
#get_rate_percentage_min_before_and_now MSCI-WORLD- INDEX $f_back || return 1
|
||||
if [ ${f_to} == "0" ] || [ ${f_from} == "0" ]
|
||||
then
|
||||
local f_msci_world_performance="-0.1"
|
||||
@ -72,6 +67,8 @@ function market_performance {
|
||||
local f_msci_world_performance=$(echo "scale=2; ${f_exchange_rate_diff_percentage}/2" | bc -l | sed -r 's/^(-?)\./\10./')
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# price performance bitcoin (last 30 minutes)
|
||||
local f_from=$(tail -n 30 asset-histories/BTC${CURRENCY}.history.csv | grep -v ^[A-Z] | head -n1 | cut -d, -f2)
|
||||
local f_to=$(tail -n 1 asset-histories/BTC${CURRENCY}.history.csv | cut -d, -f2)
|
||||
|
Loading…
Reference in New Issue
Block a user