Пример #1
0
    def max_median_position_concentration(self, positions):
        """
        The max and median of long and short position concentrations
        over the time.

        Parameters
        ----------
        positions : pd.DataFrame
            The positions that the strategy takes over time.

        Returns
        -------
        每天持有个股的最大头寸占比和头寸占比众数(分多空头)
        """
        alloc_summary = pos.get_max_median_position_concentration(positions)
        return alloc_summary
Пример #2
0
 def test_max_median_exposure(self, positions, expected):
     alloc_summary = get_max_median_position_concentration(positions)
     assert_frame_equal(expected, alloc_summary)
Пример #3
0
 def test_max_median_exposure(self, positions, expected):
     alloc_summary = get_max_median_position_concentration(positions)
     assert_frame_equal(expected, alloc_summary)