def render_decision_simulator(startup_data): """ Render the AI-powered decision simulator page. This feature helps startup founders test the financial impact of business decisions before implementing them, using AI to analyze risks and benefits. """ st.markdown("
AI-powered analysis of business decisions
", unsafe_allow_html=True) # How AI helps with decision-making with st.expander("ℹ️ How AI enhances your decision-making"): st.markdown(""" ### How AI Powers Your Decision Simulator The decision simulator uses AI to help you make better strategic decisions: - **Scenario Analysis**: Our AI model simulates multiple financial scenarios based on your input variables - **Risk Assessment**: The system automatically evaluates risk levels based on your cash runway and growth metrics - **Return Prediction**: AI algorithms predict potential returns on investments like hiring or marketing - **Opportunity Cost Analysis**: The model compares different allocations of capital to maximize growth - **Personalized Recommendations**: Based on your specific situation, the AI provides tailored alternatives This helps founders make data-driven decisions with less guesswork, avoid costly mistakes, and optimize resource allocation. """) st.write("Test the financial impact of key business decisions before implementing them. Our AI advisor will analyze the risks and benefits.") # Quick decision templates st.subheader("Common Scenarios") decision_templates = { "Hiring Engineering Team": { "description": "Evaluate the impact of growing your engineering team", "new_hires": 3, "new_marketing": 0, "other_expenses": 2000, "growth_impact": 0.02, "question": "We're considering hiring 3 more engineers to accelerate product development. How will this affect our runway and what growth impact should we expect to justify this investment?" }, "Marketing Expansion": { "description": "Test increasing your marketing budget", "new_hires": 0, "new_marketing": 15000, "other_expenses": 0, "growth_impact": 0.04, "question": "We want to increase our marketing spend by $15K/month to drive growth. What growth rate would we need to achieve to make this financially viable?" }, "Office Expansion": { "description": "Analyze the cost of moving to a larger office", "new_hires": 0, "new_marketing": 0, "other_expenses": 8000, "growth_impact": 0.01, "question": "We're considering moving to a larger office space that would add $8K/month to our expenses. Is this justified at our current stage?" }, "Custom Scenario": { "description": "Create your own custom scenario", "new_hires": 0, "new_marketing": 0, "other_expenses": 0, "growth_impact": 0.0, "question": "" } } # Template selection template_cols = st.columns(4) selected_template = None for i, (template_name, template) in enumerate(decision_templates.items()): with template_cols[i]: if st.button(f"{template_name}\n{template['description']}", key=f"template_{i}"): selected_template = template_name # Initialize form values based on selected template if selected_template and selected_template != "Custom Scenario": new_hires = decision_templates[selected_template]["new_hires"] new_marketing = decision_templates[selected_template]["new_marketing"] other_expenses = decision_templates[selected_template]["other_expenses"] growth_impact = decision_templates[selected_template]["growth_impact"] question = decision_templates[selected_template]["question"] else: new_hires = 0 new_marketing = 0 other_expenses = 0 growth_impact = 0.0 question = "" # Decision input form with st.form("decision_form"): st.subheader("Scenario Parameters") col1, col2 = st.columns(2) with col1: new_hires = st.number_input("New Engineering Hires", min_value=0, max_value=10, value=new_hires, help=f"Each engineer costs ${ENGINEER_SALARY:,} per month") st.caption(f"Monthly Cost: ${new_hires * ENGINEER_SALARY:,}") new_marketing = st.number_input("Additional Monthly Marketing Budget", min_value=0, max_value=50000, value=new_marketing, step=1000, help="Additional marketing spend per month") with col2: other_expenses = st.number_input("Other Additional Monthly Expenses", min_value=0, max_value=50000, value=other_expenses, step=1000, help="Any other additional monthly expenses") growth_impact = st.slider("Estimated Impact on Monthly Growth Rate", min_value=0.0, max_value=0.10, value=growth_impact, step=0.01, format="%.2f", help="Estimated increase in monthly growth rate due to these investments") st.caption(f"New Growth Rate: {(startup_data['growth_rate'] + growth_impact) * 100:.1f}% (current: {startup_data['growth_rate'] * 100:.1f}%)") question = st.text_area("Describe your decision scenario", value=question, height=100, placeholder="E.g., We're considering hiring two more engineers and increasing our marketing budget...") decision_summary = f""" - {new_hires} new engineers: ${new_hires * ENGINEER_SALARY:,}/month - Marketing increase: ${new_marketing:,}/month - Other expenses: ${other_expenses:,}/month - Total additional burn: ${new_hires * ENGINEER_SALARY + new_marketing + other_expenses:,}/month - Growth impact: +{growth_impact * 100:.1f}% monthly growth """ st.markdown(f"**Decision Summary:**\n{decision_summary}") submitted = st.form_submit_button("Simulate Decision") if submitted: # Calculate current and new runway current_runway, new_runway, current_df, new_df = simulate_decision( startup_data['cash'], startup_data['burn_rate'], startup_data['revenue'], startup_data['growth_rate'], other_expenses, new_hires, new_marketing, growth_impact ) # Display results st.markdown("{analysis}
", unsafe_allow_html=True) st.markdown("Risk Assessment
{risk_level} Risk Decision
This decision would give you {new_runway} months of runway.