Rainier Financial Model API

API Documentation Jupyter Notebook User Guide (Python) Changelog

Welcome to the landing page for my financial model API. Here you can find information about the available endpoints and how to use them. This API is designed to let users interact with a financial model that I have built. My name is Alex Warfel. I earned my CFA charter in 2022 and have worked in the financial services industry, focusing on portfolio reporting, quantitative research, and technology solutions.

Purpose

Determining how much money you should be saving to meet your life goals can be a daunting task. I began developing this financial model in 2017 to address this challenge because I wasn't satisfied with any of the products that were available for consumers to use, and I have been continuously refining and enhancing it ever since. The primary aim of this model is to assist individuals in understanding how much they need to save to achieve their financial objectives.

Traditional financial planning methods often rely on complex calculations such as net present value analysis or personal balance sheet evaluations, which can sometimes oversimplify the reality of one's financial situation. In contrast, this model employs a Monte Carlo simulation, which allows you to input various aspects of your financial circumstances. This approach provides a more nuanced and accurate determination of your optimal savings rate.

Your feedback is crucial in helping me further improve and fine-tune the model. There are numerous powerful insights that this model can offer. Below, you will find some examples of what the model can reveal, based on the inputs provided.

Above, you can see the results of a model run that estimates your optimal savings rate based on your goals, earnings, and other financial factors. Overall, I try to minimize the total amount you are saving because I want to avoid oversaving. By analyzing these results, you can make more informed decisions about your savings strategy.

The model demonstrates how your allocation strategy across various account types should evolve as you progress toward retirement. Each account type offers unique advantages, and a well-structured approach can help you maximize these benefits while minimizing your overall savings needs. By strategically leveraging these accounts at the appropriate stages of your financial journey, you can take full advantage of tax benefits, employer contributions, and growth opportunities. This proactive planning not only reduces the risk of oversaving but also ensures your financial resources are optimally distributed to meet your long-term goals.

The chart above illustrates how your investments might evolve over your lifetime, particularly as you allocate funds towards achieving your goals. This visualization helps you understand the potential growth of your investments and the impact of your spending decisions on your financial future. By examining these projections, you can gain valuable insights into how different financial strategies may affect your long-term wealth.

The results above were all created by passing in these variables below.

    
        modelInputs = {
          "gross_current_income": 65000,
          "estimated_monthly_expenses": 5000,
          "assets": [
              {
                  "name": "401k",
                  "type": "401k",
                  "balance": 10000,
                  "employer_match": 0.50,
                  "maximum_employer_match": 0.06,
                  "can_contribute": true
              },
              {
                  "name": "Roth IRA",
                  "type": "roth_ira",
                  "balance": 10000
              },
              {
                  "name": "Traditional IRA",
                  "type": "traditional_ira",
                  "balance": 10000
              },
              {
                  "name": "Brokerage",
                  "type": "brokerage",
                  "balance": 10000
              },
              {
                  "name": "HSA",
                  "type": "hsa",
                  "balance": 10000
              },
              {
                  "name": "529",
                  "type": "529",
                  "balance": 10000
              },
              {
                  "name": "Savings Account",
                  "type": "savings_account",
                  "balance": 5000
              },
              {
                  "name": "Checking Account",
                  "type": "checking_account",
                  "balance": 1000
              },
              {
                  "name": "Cash",
                  "type": "cash",
                  "balance": 50
              },
              {
                  "name": "Car",
                  "type": "car",
                  "balance": 25000
              },
              {
                  "name": "House",
                  "type": "house",
                  "balance": 225000
              },
              {
                  "name": "Personal Property",
                  "type": "personal_property",
                  "balance": 2300
              }
          ],
          "birthday": "2000-11-29",
          "liabilities": [
              {
                  "balance": 2500,
                  "interest_rate": 0.21,
                  "name": "Credit Card"
              },
              {
                  "balance": 90000,
                  "interest_rate": 0.05,
                  "name": "Student Loan"
              },
              {
                  "balance": 10000,
                  "interest_rate": 0.07,
                  "name": "Car Loan"
              }
          ],
          "gender": "M",
          "percentage_of_nominal_spending_for_housing": 0.25,
          "initial_retirement_age": 65,
          "personal_tracking_model": true,
          "non_retirement_goals": [
              {
                  "age": 27,
                  "amount_in_real_terms": 4000,
                  "chance_of_success": 0.90,
                  "name": "Trip to Europe"
              },
              {
                  "age": 35,
                  "amount_in_real_terms": 25000,
                  "chance_of_success": 0.75,
                  "name": "Buy a boat"
              }
          ]
      };
    

You can find the documentation for the financial model API here: API Documentation. There are several tools available to help you interact with the model. One of the most useful tools is Postman. After downloading Postman, you can import the Swagger JSON from the provided link, and Postman will automatically integrate the API's details.

Models typically take about two minutes to run, and the results are stored in a database. You can access these results using your username and password. This ensures that you can review your model outputs at any time. The standard API key allows for three model runs per month for free. If you encounter any issues or have questions, please feel free to email me at alexwarfel@gmail.com. Your feedback and inquiries are always welcome.

Security

This API is secured by a third-party authentication service, ensuring that access is tightly controlled and monitored. Importantly, personally identifiable information (PII) is not stored in any of the databases used to power this API. In the unlikely event that our database is compromised, there is no information that links financial data to PII such as names or email addresses. Additionally, users have the ability to delete their PII at any time using one of the endpoints listed in the documentation, providing an extra layer of control and security.

Methodology

The model employs Monte Carlo simulation, a robust statistical technique, to generate various financial scenarios. It innovatively creates time series for key variables such as interest rates, market returns, income growth, and change rates, as well as other path-dependent variables. The model also incorporates mortality rates and adjusts for changing housing costs, providing a comprehensive and realistic projection of financial outcomes. This methodology ensures that the model accounts for a wide range of factors that can influence financial planning.