Fantastic work with a tricky question about the term annuity! In this lesson, we will prepare the input data for our new model.
In this part, you will prepare the input data: policy data (model point set) and the interest rate.
In the input.py file, prepare data for the insured people. Use the ModelPointSet class and create a table (DataFrame). Call your model point set policy.
Add data for two people:
Fill in the code:
# input.py
from cashflower import ModelPointSet
import pandas as pd
policy = ModelPointSet(data=pd.DataFrame({
"id": [1, 2],
"benefit": [_____, _____],
"mortality_rate": [_____, _____],
"remaining_term": [_____, _____],
}))
Task: Fill in the missing values based on the data above.
Assume the monthly interest rate is 0.3%. Save it as a scalar variable interest_rate in the same file (input.py).
# input.py
interest_rate = _____
Task: Enter the interest rate as a decimal number. You do not need to convert to yearly rate.