Skip to content

onlevel factors not matching CAS example #497

Closed Answered by kennethshsu
vdunaway asked this question in Q&A
Discussion options

You must be logged in to vote

These two blocks of code should work correctly now.

Monthly approximation scenario:

rate_history = pd.DataFrame(
    {
        "EffDate": ["2010-07-01", "2011-01-01", "2012-07-01", "2013-04-01"],
        "RateChange": [0.035, 0.05, 0.10, -0.01],
    }
)
rate_history

data = pd.DataFrame({"Year": list(range(2006, 2016)), "EarnedPremium": [10_000] * 10})
prem_tri = cl.Triangle(data, origin="Year", columns="EarnedPremium", cumulative=True)
prem_tri = cl.ParallelogramOLF(
    rate_history,
    change_col="RateChange",
    date_col="EffDate",
    approximation_grain="M",
    vertical_line=False,
).fit_transform(prem_tri)
(
    np.round(prem_tri.olf_.to_frame().values, 6).flatten()
    == [
   …

Replies: 3 comments 15 replies

Comment options

You must be logged in to vote
6 replies
@vdunaway
Comment options

@kennethshsu
Comment options

@vdunaway
Comment options

@kennethshsu
Comment options

@vdunaway
Comment options

Comment options

You must be logged in to vote
3 replies
@vdunaway
Comment options

@kennethshsu
Comment options

@vdunaway
Comment options

Answer selected by kennethshsu
Comment options

You must be logged in to vote
6 replies
@vdunaway
Comment options

@jbogaardt
Comment options

@vdunaway
Comment options

@kennethshsu
Comment options

@vdunaway
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants