重新取樣資料
在這個練習中,你會把身分從日內交易者切換為波段交易者,接著再變成趨勢交易者,並依照需求調整資料。
你將使用歐元兌美元(EURUSD)的 4 小時匯率資料。資料已載入為 eurusd_4h。
本練習屬於課程
Financial Trading in Python
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Resample the data to daily by calculating the mean values
eurusd_daily = eurusd_4h.____('____').____()
# Print the top 5 rows
print(eurusd_daily.____())