A comprehensive financial analysis and calculation toolset that Claude can use as a plugin. FinClaude provides 12 powerful financial tools covering portfolio management, budgeting, tax planning, investment analysis, retirement planning, and risk management.
- Portfolio Metrics Calculator: Analyze portfolio composition, asset allocation, and gains/losses
- Asset Allocation Analysis: Compare current vs target allocation with rebalancing recommendations
- Risk Analysis: Calculate portfolio volatility, Sharpe ratio, beta, and Value at Risk
- Budget Planning: Create comprehensive budgets with savings goals and expense tracking
- Expense Analysis: Analyze spending patterns, identify trends, and find cost-cutting opportunities
- Tax Calculator: Estimate federal income taxes, capital gains, and deductions
- Tax-Loss Harvesting: Identify opportunities to offset capital gains with losses
- Loan Payment Calculator: Calculate payments, amortization schedules, and refinancing analysis
- Stock Analysis: Evaluate individual investments with valuation metrics and ratings
- Dividend Analysis: Analyze dividend portfolios for yield, growth, and sustainability
- Retirement Calculator: Project retirement savings, income needs, and longevity planning
- Net Worth Calculator: Calculate and track net worth over time
npm install finclaudegit clone https://github.com/ishaanman7898/FinClaude.git
cd finclaude
npm installimport FinClaude from 'finclaude';
// Get all available tools
const tools = FinClaude.getTools();
console.log(tools);
// Execute a tool
const result = await FinClaude.executeTool('calculate_portfolio_metrics', {
holdings: [
{
symbol: 'AAPL',
shares: 10,
current_price: 150,
purchase_price: 120,
asset_class: 'stocks'
},
{
symbol: 'BND',
shares: 20,
current_price: 80,
purchase_price: 80,
asset_class: 'bonds'
}
],
include_gains: true
});
console.log(result);To use FinClaude with Claude, provide the tools definition to Claude's API:
const tools = FinClaude.getTools();
// Pass to Claude API
const response = await claude.messages.create({
model: "claude-3-5-sonnet-20241022",
max_tokens: 4096,
tools: tools,
messages: [
{
role: "user",
content: "Analyze my portfolio and recommend rebalancing"
}
]
});Calculates total portfolio value, asset allocation, and unrealized gains/losses.
Input:
{
"holdings": [
{
"symbol": "AAPL",
"shares": 10,
"current_price": 150,
"purchase_price": 120,
"asset_class": "stocks"
}
],
"include_gains": true
}Output:
{
"summary": {
"total_portfolio_value": 1500,
"number_of_holdings": 1,
"asset_classes": 1
},
"allocation": {
"stocks": {
"value": 1500,
"percent": 100
}
},
"holdings": [...],
"gains": {
"total_gain": 300,
"total_cost_basis": 1200,
"total_gain_percent": 25
}
}Compare current allocation to target and get rebalancing recommendations.
Input:
{
"current_allocation": {
"stocks": 70,
"bonds": 20,
"cash": 10
},
"target_allocation": {
"stocks": 60,
"bonds": 30,
"cash": 10
},
"portfolio_value": 100000
}Create comprehensive budgets with expense categories and savings goals.
Input:
{
"monthly_income": 5000,
"expenses": {
"housing": 1500,
"utilities": 200,
"food": 400,
"transportation": 300,
"insurance": 200,
"debt_payments": 200,
"entertainment": 150,
"personal_care": 100,
"education": 0,
"miscellaneous": 100
},
"savings_goal_percent": 20
}Estimate federal income taxes with capital gains and deductions.
Input:
{
"gross_income": 100000,
"capital_gains": [
{
"asset": "AAPL",
"gain": 5000,
"holding_period": "long_term"
}
],
"deductions": {
"standard": 14600,
"retirement_contributions": 7000
},
"filing_status": "single",
"tax_year": 2024
}Calculate loan/mortgage payments and amortization schedules.
Input:
{
"principal": 300000,
"annual_interest_rate": 5.5,
"loan_term_years": 30,
"payment_frequency": "monthly",
"extra_payments": 100,
"calculate_amortization": false
}Analyze individual stocks with valuation metrics and ratings.
Input:
{
"ticker": "AAPL",
"current_price": 150,
"metrics": {
"pe_ratio": 25,
"dividend_yield": 0.5,
"earnings_per_share": 6.05,
"debt_to_equity": 0.3,
"annual_revenue_growth": 8,
"profit_margin": 25
},
"analysis_type": "balanced"
}Project retirement savings and income needs.
Input:
{
"current_age": 35,
"retirement_age": 65,
"current_savings": 150000,
"annual_contribution": 20000,
"annual_expenses_retirement": 60000,
"social_security_annual": 25000,
"annual_return_rate": 7,
"annual_inflation_rate": 3
}Calculate portfolio risk metrics including volatility and VaR.
Input:
{
"holdings": [
{
"symbol": "AAPL",
"allocation_percent": 30,
"historical_volatility": 28,
"beta": 1.2
},
{
"symbol": "BND",
"allocation_percent": 70,
"historical_volatility": 5,
"beta": 0.3
}
],
"expected_return": 7,
"risk_free_rate": 4,
"confidence_level": 0.95
}Identify opportunities to offset capital gains with losses.
Input:
{
"realized_gains": 10000,
"holdings_with_losses": [
{
"symbol": "STOCK1",
"purchase_price": 100,
"current_price": 80,
"shares": 50,
"purchase_date": "2024-01-01"
}
],
"wash_sale_check": true
}Calculate and analyze net worth.
Input:
{
"assets": {
"cash": 10000,
"savings_accounts": 50000,
"investment_accounts": 150000,
"retirement_accounts": 200000,
"real_estate": 400000,
"vehicles": 30000
},
"liabilities": {
"mortgages": 300000,
"auto_loans": 20000,
"credit_cards": 5000
}
}Analyze dividend portfolios for yield and sustainability.
Input:
{
"holdings": [
{
"symbol": "JNJ",
"shares": 10,
"current_price": 150,
"annual_dividend_per_share": 6,
"earnings_per_share": 9,
"free_cash_flow_per_share": 12
}
],
"total_portfolio_value": 100000
}Analyze spending patterns and trends.
Input:
{
"transactions": [
{
"date": "2024-01-01",
"amount": 50,
"category": "groceries",
"description": "Whole Foods"
},
{
"date": "2024-01-02",
"amount": 100,
"category": "utilities",
"description": "Electric Bill"
}
],
"time_period": "monthly",
"identify_subscriptions": true
}Returns all available tool definitions in Claude format.
const tools = FinClaude.getTools();Get a specific tool definition.
const tool = FinClaude.getTool('calculate_portfolio_metrics');Execute a tool with given parameters.
const result = await FinClaude.executeTool('calculate_portfolio_metrics', {
holdings: [...],
include_gains: true
});Get list of all available tool names.
const names = FinClaude.getToolNames();Validate input against tool schema.
const validation = FinClaude.validateToolInput('budget_planning', {
monthly_income: 5000,
expenses: {...}
});- Track and analyze your investment portfolio
- Plan budgets and monitor spending
- Estimate retirement savings needs
- Calculate net worth and financial health
- Evaluate stock opportunities
- Analyze dividend stocks
- Assess portfolio risk
- Identify rebalancing needs
- Estimate annual tax liability
- Identify tax-loss harvesting opportunities
- Plan charitable giving strategies
- Calculate loan payments
- Analyze refinancing opportunities
- Create mortgage payoff plans
- Assess debt-to-income ratios
- These tools provide estimates for educational and planning purposes
- Tax calculations are simplified and may not reflect actual tax liability
- Consult with tax professionals, financial advisors, and investment professionals for actual planning decisions
- Past performance does not guarantee future results
- All calculations assume consistent inputs and don't account for individual circumstances
Contributions are welcome! Please submit issues and pull requests to the GitHub repository.
MIT License - see LICENSE file for details
For issues, feature requests, or questions:
- Open an issue on GitHub
- Check existing documentation in this README
- Support for cryptocurrency portfolio analysis
- Advanced tax optimization strategies
- Real-time market data integration
- Multi-currency support
- Estate planning tools
- Insurance planning tools
- College savings calculators
- Option strategy analysis
FinClaude - Empowering financial decision-making with Claude