بنقرة واحدة
quantitative-finance-guide
Quantitative methods for financial modeling, derivatives pricing, and risk an...
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Quantitative methods for financial modeling, derivatives pricing, and risk an...
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Route empirical-research requests through the Auto-Empirical Research Skills catalog when this whole repository is installed as one skill in Codex, CodeBuddy, Claude Code, or another IDE. Use to choose and load the right vendored AERS skill for causal inference, econometrics, replication, data acquisition, manuscript writing, peer review and referee responses, citation checking, de-AIGC editing, or full empirical-paper workflows without reading the entire repository at once.
公司金融实证研究的"漏斗式选题查找器"。互动开场先后询问 (1) 研究方向、(2) 候选标题数量 N, 再扫描全球文献(已出版英文学术期刊 + SSRN working paper + 全球高校 department seminar 1 年内日程),基于 Edmans (2024) "1000 Rejections" 红线生成 N 个候选标题,**通过并行 subagent(Agent 工具)批量生成计划书 + 查新;每个 subagent 必须强制调用 Skill 工具加载 econfin-proposal 与 novelty-check 两个预设 skill 完成各自模块**,**只有当 novelty score >= 9 时(即 JF/JFE/RFS 顶刊层次),subagent 才把 proposal + 查新报告合并的 md 写入 F:\Dropbox\CC\选题大全\<研究方向短名>\(以"简短选题名称-分数"命名,子文件夹名由 Step 0 从用户输入的研究方向派生);< 9 分的选题在 subagent 内部直接丢弃,绝不写盘、绝不输出**。当用户说"找选题"、"帮我找选题"、"想做 X 方向"、 "empirical CF idea search"、"批量生成研究计划书"、"100 ideas"、"econfin-idea-finder" 时触发。
Create and compile beautiful Beamer presentations following the Rhetoric of Decks philosophy. Use when making slides, creating decks, or compiling .tex presentation files.
Scaffold a new research project with standard directory structure, CLAUDE.md template, and documented README. Use this at the start of every new project to ensure consistent organization.
Download, split, and deeply read academic PDFs. Use when asked to read, review, or summarize an academic paper. Splits PDFs into 4-page chunks, reads them in small batches, and produces structured reading notes — avoiding context window crashes and shallow comprehension.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
| name | quantitative-finance-guide |
| description | Quantitative methods for financial modeling, derivatives pricing, and risk an... |
| metadata | {"openclaw":{"emoji":"📊","category":"domains","subcategory":"finance","keywords":["quantitative finance","financial data","stock analysis","pricing psychology","derivatives pricing"],"source":"wentor"}} |
A rigorous skill for applying quantitative methods to financial research, covering derivatives pricing, portfolio optimization, risk modeling, and time series econometrics. Designed for academic researchers and quantitative analysts.
The foundational model for European option pricing:
import numpy as np
from scipy.stats import norm
def black_scholes(S: float, K: float, T: float, r: float,
sigma: float, option_type: str = 'call') -> dict:
"""
Black-Scholes European option pricing.
Args:
S: Current stock price
K: Strike price
T: Time to maturity (years)
r: Risk-free rate (annualized)
sigma: Volatility (annualized)
option_type: 'call' or 'put'
"""
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':
price = S * norm.cdf(d1) - K * np.exp(-r * T) * norm.cdf(d2)
else:
price = K * np.exp(-r * T) * norm.cdf(-d2) - S * norm.cdf(-d1)
greeks = {
'delta': norm.cdf(d1) if option_type == 'call' else norm.cdf(d1) - 1,
'gamma': norm.pdf(d1) / (S * sigma * np.sqrt(T)),
'theta': -(S * norm.pdf(d1) * sigma) / (2 * np.sqrt(T)),
'vega': S * norm.pdf(d1) * np.sqrt(T),
'rho': K * T * np.exp(-r * T) * norm.cdf(d2) if option_type == 'call'
else -K * T * np.exp(-r * T) * norm.cdf(-d2)
}
return {'price': price, 'greeks': greeks}
# Example: price a call option
result = black_scholes(S=100, K=105, T=0.5, r=0.05, sigma=0.20, option_type='call')
print(f"Call Price: ${result['price']:.2f}")
print(f"Delta: {result['greeks']['delta']:.4f}")
For path-dependent options and complex payoffs:
def monte_carlo_option(S0, K, T, r, sigma, n_paths=100000, n_steps=252):
"""Geometric Brownian Motion Monte Carlo pricer."""
dt = T / n_steps
Z = np.random.standard_normal((n_paths, n_steps))
paths = np.zeros((n_paths, n_steps + 1))
paths[:, 0] = S0
for t in range(n_steps):
paths[:, t + 1] = paths[:, t] * np.exp(
(r - 0.5 * sigma**2) * dt + sigma * np.sqrt(dt) * Z[:, t]
)
payoffs = np.maximum(paths[:, -1] - K, 0)
price = np.exp(-r * T) * np.mean(payoffs)
std_err = np.exp(-r * T) * np.std(payoffs) / np.sqrt(n_paths)
return {'price': price, 'std_error': std_err, '95_ci': (price - 1.96*std_err, price + 1.96*std_err)}
Construct efficient frontiers using quadratic programming:
from scipy.optimize import minimize
def efficient_frontier(returns: np.ndarray, n_portfolios: int = 50) -> list:
"""
Compute efficient frontier points.
returns: T x N array of asset returns
"""
n_assets = returns.shape[1]
mean_returns = returns.mean(axis=0)
cov_matrix = np.cov(returns.T)
results = []
target_returns = np.linspace(mean_returns.min(), mean_returns.max(), n_portfolios)
for target in target_returns:
constraints = [
{'type': 'eq', 'fun': lambda w: np.sum(w) - 1},
{'type': 'eq', 'fun': lambda w, t=target: w @ mean_returns - t}
]
bounds = [(0, 1)] * n_assets
w0 = np.ones(n_assets) / n_assets
result = minimize(lambda w: w @ cov_matrix @ w, w0,
bounds=bounds, constraints=constraints, method='SLSQP')
if result.success:
vol = np.sqrt(result.fun)
results.append({'return': target, 'volatility': vol, 'weights': result.x})
return results
Three approaches to VaR estimation:
def compute_var_es(returns: np.ndarray, confidence: float = 0.95) -> dict:
"""Compute VaR and Expected Shortfall (CVaR)."""
sorted_returns = np.sort(returns)
var_index = int((1 - confidence) * len(sorted_returns))
var = -sorted_returns[var_index]
es = -sorted_returns[:var_index].mean()
return {'VaR': var, 'ES': es, 'confidence': confidence}
For financial time series, test for stationarity (ADF test), model volatility clustering with GARCH models, and check for cointegration in pairs trading strategies. Always report Newey-West standard errors when autocorrelation is present, and use information criteria (AIC, BIC) for model selection.