File tree Expand file tree Collapse file tree 1 file changed +16
-12
lines changed Expand file tree Collapse file tree 1 file changed +16
-12
lines changed Original file line number Diff line number Diff line change @@ -2652,24 +2652,28 @@ def get_exchange_rates(
26522652 tqdm_message = "Obtaining exchange data" ,
26532653 )
26542654 else :
2655- # In case there is no conversion needed, it should just create an empty DataFrame
2655+ # In case there is no conversion needed, it should create a placeholder
2656+ # DataFrame that works with the rest of the Toolkit.
26562657 self ._daily_exchange_rate_data = pd .DataFrame (
2658+ data = 1 ,
26572659 index = pd .PeriodIndex (
26582660 pd .date_range (
26592661 start = self ._start_date , end = self ._end_date , freq = "D"
26602662 )
26612663 ),
2662- columns = [
2663- "Open" ,
2664- "High" ,
2665- "Low" ,
2666- "Close" ,
2667- "Adj Close" ,
2668- "Volume" ,
2669- "Return" ,
2670- "Volatility" ,
2671- "Cumulative Return" ,
2672- ],
2664+ columns = pd .MultiIndex .from_tuples (
2665+ [
2666+ ("Open" , "USDUSD=X" ),
2667+ ("High" , "USDUSD=X" ),
2668+ ("Low" , "USDUSD=X" ),
2669+ ("Close" , "USDUSD=X" ),
2670+ ("Adj Close" , "USDUSD=X" ),
2671+ ("Volume" , "USDUSD=X" ),
2672+ ("Return" , "USDUSD=X" ),
2673+ ("Volatility" , "USDUSD=X" ),
2674+ ("Cumulative Return" , "USDUSD=X" ),
2675+ ]
2676+ ),
26732677 )
26742678
26752679 # For exchange data, it is possible that a ticker such as USDUSD=X
You can’t perform that action at this time.
0 commit comments