Invalid JSON: Expected ',' or '}' after property value in JSON
at line 12, column 27
| { | |
| "examples": [ | |
| { | |
| "task": "Create a Monte Carlo simulation for stock price forecasting", | |
| "domain": "quantitative_analysis", | |
| "input": { | |
| "historical_data": "3 years of daily closing prices", | |
| "forecast_period": "30 days", | |
| "volatility_method": "historical" | |
| }, | |
| "output": { | |
| "code": """import numpy as np\nimport pandas as pd\n\ndef monte_carlo_simulation(prices, days=30, simulations=1000):\n # Calculate returns\n returns = prices.pct_change().dropna()\n mean_return = returns.mean()\n std_dev = returns.std()\n \n # Generate random returns\n random_returns = np.random.normal(mean_return, std_dev, (days, simulations))\n \n # Calculate future prices\n last_price = prices.iloc[-1]\n future_prices = last_price * (1 + random_returns).cumprod()\n \n return future_prices\n""", | |
| "analysis": { | |
| "confidence": 0.85, | |
| "risk_profile": "moderate", | |
| "computational_complexity": "medium" | |
| } | |
| } | |
| }, | |
| { | |
| "task": "Optimize a portfolio using mean-variance optimization", | |
| "domain": "quantitative_analysis", | |
| "input": { | |
| "assets": ["AAPL", "GOOGL", "MSFT", "AMZN"], | |
| "risk_tolerance": 0.1, | |
| "expected_returns": [0.12, 0.15, 0.10, 0.13] | |
| }, | |
| "output": { | |
| "code": """import numpy as np\nimport cvxpy as cp\n\ndef optimize_portfolio(returns, risk_tolerance):\n n = len(returns)\n weights = cp.Variable(n)\n \n # Objective: maximize return\n objective = cp.Maximize(returns @ weights)\n \n # Constraints: sum of weights = 1, risk <= tolerance\n constraints = [cp.sum(weights) == 1,\n cp.quad_form(weights, np.cov(returns)) <= risk_tolerance]\n \n prob = cp.Problem(objective, constraints)\n prob.solve()\n \n return weights.value\n""", | |
| "analysis": { | |
| "confidence": 0.9, | |
| "risk_profile": "low", | |
| "computational_complexity": "high" | |
| } | |
| } | |
| } | |
| ] | |
| } | |