![]() The `block_size` defines the size of the block, which is chosen for 60 business days. The `result` argument is the result of bootstrap sampling, which has the dimension of. It is the `ref` argument in the kernel function, which has the dimension of. It serves as a reference matrix where we sample the random blocks. Since stock prices are non-stationary, the stock price time series data is first converted to log returns. Result[sample_id, asset_id, position_id * block_size + If (position_id * block_size + loc + 1 < length): Position_id = % num_positionsįor k in range(i, block_size*assets, ): boot_strap(result, ref, block_size, num_positions, positions): Notice the decorator, which tells Numba to just-in-time compile the boot_strap kernel. Papenbrock and Schwendner (2015) found multi-asset correlation patterns to change at a typical frequency of a few months.įigure 2: Create synthetic market data by Boomstrap methodįollowing is the Numba kernel to sample blocks from the reference prices matrix. This block length is motivated by a typical monthly or quarterly rebalancing frequency of dynamic rule-based strategies and by the empirical market dynamics that happen on this time scale. We choose to use a block of 60 business days. Each block has a fixed length, but a random starting point in time is defined from the futures return time-series. A new return time series is constructed by sampling the blocks with replacement to reconstruct a time series with the same length as the original time series. We will describe in detail how to perform block bootstrapping calculations in a Numba GPU kernel.īootstrapped datasets are used to account for the non-stationarity of time series’ future returns. The different scenarios are calculated using multiple GPU threads. Since the generated scenarios are independent from each other and large in number, a better method of parallelism should be at the scenario level. We might be able to vectorize a few steps of the HRP algorithm, however, the speed-up will be minimal because only a smaller number of parallel threads are used. Then, it distributes the allocation through recursive bisection based on the cluster covariance. It reorganizes the covariance matrix of the stock returns so similar investments are placed together. Some of the steps, like the HRP algorithm, are serial in nature. To accelerate them on the GPU, the most important thing that we need to identify is the granularity of the parallelism. There are quite a few steps involved in the preceding computation. ![]() Compute the Average annual Returns, STD Returns, Sharpe Ratios, Maximum Drawdown, and Calmar Ratio performance metrics for these two methods (HRP-NRP).įigure 1: Computation graph for the portfolio construction algorithm.At every rebalancing date, calculate the portfolio leverage to reach the volatility target. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |