New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CapeCod exposure on-level vector #66
Comments
Option 1 for API: cl.CapeCod(on_level=on_level_vector).fit(X,sample_weight=sample_weight) Pros: matches closer to sklearn api Option 2 for API: cl.CapeCod().fit(X,sample_weight=sample_weight, on_level=on_level) Pros: puts "data" where it belongs |
Option 3 (Preferred): # Assuming we have a rate history DataFrame with columns 'rate_change' and 'eff_date'
olf = cl.ParallelogramOLF(rate_history, change_col='rate_change', date_col='eff_date')
sample_weight = olf.fit_transform(sample_weight)
assert hasattr(sample_weight, 'olf_') # sample_weight should have 'olf_' property
cl.CapeCod().fit(X,sample_weight=sample_weight) # cape cod will access 'olf_' property if available |
Refer to this example on how to use. |
CapeCod
needs to support an exposure on-level (or trend) vector to make it useful in the real world.The text was updated successfully, but these errors were encountered: