This function is part of the Shiny reactive functions. The function looks at what strategy, portfolio and instrument the user selects, and then slices the data set into different pieces or summarizes the data set into a summary.
slice_data(x, input, capital.num)
A small data set that has been retrieved from the previous data set.
is an input data frame that is to be sliced according to the user's selection of strategy, portfolio and instrument.
is a Shiny object that contains all the shiny inputs as a list.
is the amount of allocated capital for the portfolio, numeric type. The function will use capital.num to calculate return rates if available, or use everyday's GMV to calculate return rates instead.