Question: python Question 8 1 pts For the function of the previous question, what does the line trades.loc[start_date] = new_positions - previous positions do? You need
Question 8 1 pts For the function of the previous question, what does the line "trades.loc[start_date] = new_positions - previous positions" do? You need to select all correct statements: This calculates the dollar amounts by which we rebalance each asset on the start date of the current holding period This calculates the total dollar amount by which we rebalance the entire portfolio on the start_date of the current holding period new_positions - previous_positions is a single number (float) new_positions - previous positions is a pandas series new_positions - previous positions is a pandas dataframe trades.locIstart_date] inserts a new row at index start date into the table trades e trades.loc(start_date] inserts a new value at index start date into the series trades
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
