Your ROOT_URL in app.ini is http://192.168.1.7:3000/ but you are visiting http://shqkxh.org:3000/guofu/dolphin-dev/blame/commit/65d667ecab3c23558a5d2c3d9081fe54ecdab54f/dolphindb/test.dos You should set ROOT_URL correctly, otherwise the web may not work correctly.
dolphin-dev/dolphindb/test.dos

13 lines
467 B

3 years ago
symbol = take(`AAPL, 6) join take(`FB, 5)
time = 2019.02.27T09:45:01.000000000 + [146, 278, 412, 445, 496, 789, 212, 556, 598, 712, 989]
price=173.27 173.26 173.24 173.25 173.26 173.27 161.51 161.50 161.49 161.50 161.51
quotes=table(symbol, time, price)
print(quotes)
weights = dict(`AAPL`FB, 0.6 0.4)
print(weights)
ETF = select symbol, time, price*weights[symbol] as price from quotes;
print(ETF)
select rowSum(ffill(last(price))) from ETF pivot by time, symbol;