financial-analysis-net-present-value
БесплатноБез исполняемых скриптовНе проверенSub-skill of financial-analysis: Net Present Value (+5).
от vamseeachanta★ 21 звезда на GitHubОб этом скилле
Net Present Value (+5)
Net Present Value
def calculate_npv(cash_flows, discount_rate, initial_investment=0):
"""Calculate Net Present Value."""
pv = sum([cf / (1 + discount_rate)**i
for i, cf in enumerate(cash_flows, 1)])
return pv - initial_investment
WACC Calculation
def calculate_wacc(equity_weight, debt_weight, cost_of_equity,
cost_of_debt, tax_rate):
"""Calculate Weighted Average Cost of Capital."""
return (equity_weight * cost_of_equity +
debt_weight * cost_of_debt * (1 - tax_rate))
Sharpe Ratio
import numpy as np
def sharpe_ratio(returns, risk_free_rate, periods_per_year=252):
"""Calculate Sharpe Ratio."""
excess_returns = returns - risk_free_rate / periods_per_year
return np.sqrt(periods_per_year) * (excess_returns.mean() /
excess_returns.std())
Black-Scholes Option Pricing
from scipy.stats import norm
import numpy as np
def black_scholes(S, K, T, r, sigma, option_type='call'):
"""Black-Scholes option pricing."""
d1 = (np.log(S / K) + (r + 0.5 * sigma**2) * T) / (sigma * np.sqrt(T))
d2 = d1 - sigma * np.sqrt(T)
if option_type == 'call':
return S * norm.cdf(d1) - K * np.exp(-r * T) * norm.cdf(d2)
return K * np.exp(-r * T) * norm.cdf(-d2) - S * norm.cdf(-d1)
Portfolio Metrics
import pandas as pd
import numpy as np
from typing import Dict
def calculate_portfolio_metrics(
returns: pd.Series,
weights: np.ndarray,
risk_free_rate: float = 0.02,
periods_per_year: int = 252
*See sub-skills for full details.*
## Data Validation
```python
import pandas as pd
def validate_financial_data(data: pd.DataFrame) -> None:
"""Validate financial data quality and completeness."""
if data.isnull().any().any():
missing_cols = data.columns[data.isnull().any()].tolist()
raise ValueError(f"Missing values in columns: {missing_cols}")
price_cols = [col for col in data.columns if 'price' in col.lower()]
for col in price_cols:
if (data[col] < 0).any():
raise ValueError(f"Negative values in price column: {col}")
if 'volume' in data.columns and (data['volume'] < 0).any():
raise ValueError("Negative volume detected")
Установить financial-analysis-net-present-value в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл financial-analysis-net-present-value?
Sub-skill of financial-analysis: Net Present Value (+5).
Как установить скилл financial-analysis-net-present-value?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл financial-analysis-net-present-value запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic