Skip to content

Robo Advisor for retirement investments of remixed weights between stock index SPY and bond ETF AGG

License

Notifications You must be signed in to change notification settings

Ava33343/Beach_Ready

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Beach Ready?

Sailing for An Early Retirement!

Option 1: Robo Advisor for Retirement Plans

A bot RoboAdvisor is built for retirement planning on Amazon Lex.

Demo:

Scenario 1: when the provided age falls between 0 and 65 with an investment of at least $5000

Scenario 2: when investing less than $5000 or the age provided falls outside the range of 0 to 65

Robo_true Robo_false

Files



Details

Two more utterances are added to those provided in the instructions as follows:

  • How to retire early and take ​{riskLevel}​ risk
  • I need ​{investmentAmount}​ by ​{age}​ to retire

Recommendations are built under the recommend_portfolio(intent_request) function as follows:

    """
    Performs dialog management and fulfillment for recommending a portfolio.
    """
    risk_level = get_slots(intent_request)["riskLevel"]
    # define investment portfolio recommendations

"""
    Responses based on selected risk levels.
    """
    risk = {
        "None": "100% bonds (AGG), 0% equities (SPY)",
        "Very Low": "80% bonds (AGG), 20% equities (SPY)",
        "Low": "60% bonds (AGG), 40% equities (SPY)",
        "Medium": "40% bonds (AGG), 60% equities (SPY)",
        "High": "20% bonds (AGG), 80% equities (SPY)",
        "Very High": "0% bonds (AGG), 100% equities (SPY)"
    }

with initial recommendation

# Get the initial investment recommendation
    initial_recommendation = risk[risk_level]

Test Results on Lambda Function:

Results (click me):

Robo Age Test Result Robo Amount Test Result Robo Dialogue Test Result Robo Negative Age

Test Files (provided)

Customize riskLevel Slot

Prompt cards on risk levels (click me):

Robo_riskLevel_None Robo_riskLevel_Low Robo_riskLevel_Medium Robo_riskLevel_High

Design on RecommendPortfolio Intent:

Overview on Amazon Lex (click me):

Robo_RecommendPortfolio_intent

Next Steps

  • Construct post-confirmation intents using get_slots on riskLevel responses. In the current version, the Confirmation Prompt box was unchecked on Amazon Lex intent builder as it "short-circuit" the trigger to select riskLevel.
    • If ordering becomes an issue, define a separate function recommended_portfolios(risk) shown below could be an alternative to the current risk dictionary defined under the function recommend_portfolio(intent_request):
Click me for details on an alternative function:
 # define investment portfolio recommendations
def recommended_portfolios(risk):
"""
Responses based on selected risk levels.
"""
risk = {
    "None": "100% bonds (AGG), 0% equities (SPY)",
    "Very Low": "80% bonds (AGG), 20% equities (SPY)",
    "Low": "60% bonds (AGG), 40% equities (SPY)",
    "Medium": "40% bonds (AGG), 60% equities (SPY)",
    "High": "20% bonds (AGG), 80% equities (SPY)",
    "Very High": "0% bonds (AGG), 100% equities (SPY)"
    }
    return risk[risk_level]

It follows that the initial_recommendation defined under the current recommend_portfolio(intent_request) function becomes:

# Get the initial investment recommendation
    initial_recommendation = recommended_portfolios(risk)
  • Add additional slots to respond based on feedbacks

    • Allow customers to go back and re-select their risk levels
    • Provide more customized recommendations, e.g. more variety under each riskLevel
  • Deploy RoboAdvisor on Facebook or Slack on Channels tab using Amazon Lex Documentations

    • Graphic analyzers are available under Monitoring tab on Lex

References

About

Robo Advisor for retirement investments of remixed weights between stock index SPY and bond ETF AGG

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published