MackChainladder.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:chainladder-python 作者: jbogaardt 项目源码 文件源码
def __get_tail_se(self):
        """ Method to produce the standard error of the Mack Chainladder 
        model tail factor


        Returns:
            This calculation is consistent with the R calculation 
            MackChainLadder$tail.se
        """

        tailse = np.array(self.sigma[-2] / \
            np.sqrt(self.full_triangle.iloc[0, -3]**self.alpha[-1]))
        if self.chainladder.tail == True:
            time_pd = self.__get_tail_weighted_time_period()
            fse = np.append(self.fse, tailse)
            x = np.array([i + 1 for i in range(len(fse))])
            fse_reg = stats.linregress(x, np.log(fse))
            tailse = np.append(tailse, np.exp(time_pd * fse_reg[0] + fse_reg[1]))
        else:
            tailse = np.append(tailse,0)
        return tailse
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号