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/731a15bb012b6d0b8859068d4453702a6e5ca70a/dolphindb/project/scripts/min_kurtosis.dos You should set ROOT_URL correctly, otherwise the web may not work correctly.
dolphin-dev/dolphindb/project/scripts/min_kurtosis.dos

8 lines
504 B

tbl = loadTable("dfs://hft_stock_ts", 'KLinePartitioned')
// calculate the minute return
// `eachPre` applies the binary function (the 1st arg) to this row and its previous row
// TODO: m_nDate filter condition should be replaced by groupby
ret = select code, m_nDate, m_nTime, eachPre(\, m_nClose) - 1.0 as ret from tbl where m_nDate=2015.01.05 context by code limit 10;
kurto = select code, m_nDate, sqrt(239) * sum(pow(ret, 3)) / pow(sum(pow(ret, 2)), 1.5) as kurtosis from ret where group by code;