Green Investment Portfolio Builder

Green Investment Portfolio Builder

Green Investment Portfolio Builder

"; return; } // Calculate total investment growth using compound interest formula var totalInvestment = investmentAmount * 12 * yearsToInvest; var futureValue = (investmentAmount * ((Math.pow(1 + (returnRate / 100 / 12), 12 * yearsToInvest) - 1) / (returnRate / 100 / 12))).toFixed(2); // Portfolio recommendations based on risk tolerance var portfolioRecommendation = ''; if (riskTolerance === 'low') { portfolioRecommendation = `

Low Risk Portfolio: A low-risk portfolio may include a higher allocation to green bonds and diversified green ETFs that focus on sustainability. Consider platforms like **Betterment** or **Wealthfront** for automated, low-risk investments in eco-friendly assets.

`; } else if (riskTolerance === 'moderate') { portfolioRecommendation = `

Moderate Risk Portfolio: A moderate-risk portfolio may include a mix of green stocks and bonds, with exposure to renewable energy companies and sustainable ETFs. Platforms like **M1 Finance** or **SoFi** offer a balanced approach to sustainable investing.

`; } else if (riskTolerance === 'high') { portfolioRecommendation = `

High Risk Portfolio: A high-risk portfolio may focus on higher-return assets like green technology startups, renewable energy stocks, or emerging green markets. Consider using platforms like **Robinhood** or **Acorns** for higher-risk, growth-focused green investments.

`; } // Specific recommendations based on investment goal var goalRecommendation = ''; if (investmentGoal === 'retirement') { goalRecommendation = `

Goal: Save for Retirement: Consider long-term green funds like those offered by **Vanguard** or **Fidelity**. These funds invest in companies that prioritize sustainability and provide a solid foundation for retirement planning.

`; } else if (investmentGoal === 'short-term') { goalRecommendation = `

Goal: Short-Term Savings: For short-term goals, consider investing in green ETFs or low-cost sustainable funds that offer liquidity and shorter investment horizons. Platforms like **SoFi** or **Wealthfront** can help you achieve your short-term green investing goals.

`; } else if (investmentGoal === 'long-term') { goalRecommendation = `

Goal: Build Long-Term Wealth: To build long-term wealth, focus on green investment opportunities that align with environmental sustainability, such as renewable energy, electric vehicles, and water conservation technologies. **M1 Finance** or **Acorns** may be ideal for long-term, growth-focused green investments.

`; } // Display the results with growth projections and personalized recommendations result.innerHTML = `

Investment Growth Projection: Over ${yearsToInvest} years, with a monthly contribution of $${investmentAmount.toFixed(2)} and an expected annual return rate of ${returnRate}%, your investment could grow to approximately $${futureValue}.

${portfolioRecommendation} ${goalRecommendation}

Green Investment Categories Selected: ${greenCategories.join(', ')}

`; });