diff --git a/app/src/sections/GuideSection.tsx b/app/src/sections/GuideSection.tsx
index 1aeaa2a..b54fbd6 100644
--- a/app/src/sections/GuideSection.tsx
+++ b/app/src/sections/GuideSection.tsx
@@ -49,8 +49,6 @@ export default function GuideSection() {
}
description="方向敏感度:标的价格每变动 1 单位,期权价格变动多少"
callFormula="Δ_call = N(d₁)"
@@ -63,8 +61,6 @@ export default function GuideSection() {
}
description="凸性风险:Delta 对价格变动的敏感度,衡量对冲误差"
callFormula="Γ = N'(d₁) / (S·σ·√T)"
@@ -77,8 +73,6 @@ export default function GuideSection() {
}
description="时间衰减:每过一天,期权价值因时间流逝损失多少"
callFormula="Θ = -S·N'(d₁)·σ / (2√T)"
@@ -91,8 +85,6 @@ export default function GuideSection() {
}
description="波动率敏感度:隐含波动率每变化 1 个百分点,期权价格变动多少"
callFormula="ν = S·√T·N'(d₁)·0.01"
@@ -576,8 +568,8 @@ export default function GuideSection() {
);
}
-function GreekGuideCard({ title, symbol, color, borderColor, icon, description, callFormula, putFormula, range, keyInsight, behavior }: {
- title: string; symbol: string; color: string; borderColor: string; icon: React.ReactNode;
+function GreekGuideCard({ title, symbol, icon, description, callFormula, putFormula, range, keyInsight, behavior }: {
+ title: string; symbol: string; icon: React.ReactNode;
description: string; callFormula: string; putFormula: string; range: string; keyInsight: string; behavior: string;
}) {
return (
diff --git a/app/src/sections/ReverseSolver.tsx b/app/src/sections/ReverseSolver.tsx
index bad9821..ca3570d 100644
--- a/app/src/sections/ReverseSolver.tsx
+++ b/app/src/sections/ReverseSolver.tsx
@@ -35,7 +35,7 @@ export default function ReverseSolver() {
const T = tUnit === 'days' ? contract.T_days / 365 : contract.T_days;
- const upd = (fn: Function, key: string, val: string) => { const n = parseFloat(val); if (!isNaN(n)) fn((p: any) => ({ ...p, [key]: n })); };
+ const upd = (fn: Function, key: string, val: string) => { if (val === '') return; const n = parseFloat(val); if (!isNaN(n)) fn((p: any) => ({ ...p, [key]: n })); };
const res1 = useMemo(() => {
const t: any = {};
@@ -204,24 +204,24 @@ export default function ReverseSolver() {
{res1 && (
-
+
-
计算结果
+
计算结果
- 多约束优化收敛
- {res1.T_from_theta && T 由 Theta 反推}
+ 多约束优化收敛
+ {res1.T_from_theta && T 由 Theta 反推}
-
-
推算权利金
-
${res1.price.toFixed(4)}
-
σ = {res1.sigma.toFixed(4)} ({(res1.sigma * 100).toFixed(2)}%)
+
+
推算权利金
+
${res1.price.toFixed(4)}
+
σ = {res1.sigma.toFixed(4)} ({(res1.sigma * 100).toFixed(2)}%)
-
-
推算剩余期限
-
{res1.DTE} 天
-
T = {res1.T.toFixed(4)} 年
+
+
推算剩余期限
+
{res1.DTE} 天
+
T = {res1.T.toFixed(4)} 年
@@ -233,8 +233,8 @@ export default function ReverseSolver() {
{truth1 && (
-
-
验证:内在价值={truth1.intrinsic.toFixed(4)} 时间价值={truth1.timeValue.toFixed(4)} ITM概率={(truth1.itmProb * 100).toFixed(2)}%
+
+ 验证:内在价值={truth1.intrinsic.toFixed(4)} 时间价值={truth1.timeValue.toFixed(4)} ITM概率={(truth1.itmProb * 100).toFixed(2)}%
)}
@@ -245,10 +245,10 @@ export default function ReverseSolver() {
{/* Mode 2 */}
-
+
- 已知权利金 + 希腊字母 → 求解期货价 S
- 输入权利金和希腊字母。勾选 Theta 时引擎联合搜索 S、σ、T。
+ 已知权利金 + 希腊字母 → 求解期货价 S
+ 输入权利金和希腊字母。勾选 Theta 时引擎联合搜索 S、σ、T。
@@ -271,24 +271,24 @@ export default function ReverseSolver() {
{res2 && (
-
+
-
计算结果
+
计算结果
- 多维优化收敛
- {res2.T_from_theta && T 由 Theta 反推}
+ 多维优化收敛
+ {res2.T_from_theta && T 由 Theta 反推}
-
-
推算期货价格 S
-
${res2.S.toFixed(4)}
-
σ = {res2.sigma.toFixed(4)} ({(res2.sigma * 100).toFixed(2)}%)
+
+
推算期货价格 S
+
${res2.S.toFixed(4)}
+
σ = {res2.sigma.toFixed(4)} ({(res2.sigma * 100).toFixed(2)}%)
-
-
推算剩余期限
-
{res2.DTE} 天
-
T = {res2.T.toFixed(4)} 年
+
+
推算剩余期限
+
{res2.DTE} 天
+
T = {res2.T.toFixed(4)} 年
@@ -300,8 +300,8 @@ export default function ReverseSolver() {
-
-
验证:内在价值={res2.greeks.intrinsic.toFixed(4)} 时间价值={res2.greeks.timeValue.toFixed(4)} ITM概率={(res2.greeks.itmProb * 100).toFixed(2)}%
+
+ 验证:内在价值={res2.greeks.intrinsic.toFixed(4)} 时间价值={res2.greeks.timeValue.toFixed(4)} ITM概率={(res2.greeks.itmProb * 100).toFixed(2)}%
)}
@@ -311,25 +311,25 @@ export default function ReverseSolver() {
{/* Mode 3 */}
-
+
- 已知权利金 + 期货价 → 求解隐含波动率
+ 已知权利金 + 期货价 → 求解隐含波动率
{res3 !== null && (
-
+
-
计算结果
- Newton-Raphson 收敛
+ 计算结果
+ Newton-Raphson 收敛
-
-
推算隐含波动率 σ
-
{(res3 * 100).toFixed(2)}%
-
小数: {res3.toFixed(6)}
+
+
推算隐含波动率 σ
+
{(res3 * 100).toFixed(2)}%
+
小数: {res3.toFixed(6)}
)}
@@ -339,9 +339,9 @@ export default function ReverseSolver() {
{/* Mode 4 */}
-
+
- 已知 S + σ + 希腊字母 → 求解剩余期限 T + 权利金
+ 已知 S + σ + 希腊字母 → 求解剩余期限 T + 权利金
@@ -354,9 +354,9 @@ export default function ReverseSolver() {
upd(setM4, 'theta', v)} color="text-rose-400" icon={} on={m4On.theta} toggle={() => setM4On(p => ({ ...p, theta: !p.theta }))} />
{m4On.theta && (
-
-
-
+
+
+
)}
@@ -364,22 +364,22 @@ export default function ReverseSolver() {
upd(setM4, 'vega', v)} color="text-purple-400" icon={} on={m4On.vega} toggle={() => setM4On(p => ({ ...p, vega: !p.vega }))} />
{res4 && (
-
+
-
计算结果
- 时间衰减维度收敛
+ 计算结果
+ 时间衰减维度收敛
-
-
推算剩余期限 T
-
{Math.round(res4.T * 365)} 天
-
{res4.T.toFixed(4)} 年
+
+
推算剩余期限 T
+
{Math.round(res4.T * 365)} 天
+
{res4.T.toFixed(4)} 年
-
-
推算权利金
-
${res4.price.toFixed(4)}
-
S={m4.S}, σ={m4.sigma}
+
+
推算权利金
+
${res4.price.toFixed(4)}
+
S={m4.S}, σ={m4.sigma}
{res4.residuals.price !== undefined && }
@@ -389,8 +389,8 @@ export default function ReverseSolver() {
{res4.residuals.vega !== undefined && }
-
-
数学原理:Delta = N(d₁) → d₁ = N⁻¹(Δ) → 由 d₁ = [ln(S/K) + 0.5σ²T]/(σ√T) 对 T 二分搜索求解。
+
+ 数学原理:Delta = N(d₁) → d₁ = N⁻¹(Δ) → 由 d₁ = [ln(S/K) + 0.5σ²T]/(σ√T) 对 T 二分搜索求解。
)}
@@ -399,24 +399,24 @@ export default function ReverseSolver() {
-
- 算法原理说明
-
+
+ 算法原理说明
+
-
1. S + Delta(+Theta) → 权利金
+
1. S + Delta(+Theta) → 权利金
未勾选 Theta:T 固定,仅通过 Delta 反推 σ。
-
勾选 Theta:启动联合优化。引擎在 T ∈ [1/365, 3年] 范围内做二维网格搜索,对每个候选 T 用 Delta 求解 σ,然后评估 Theta 匹配度。最后通过梯度下降精修 (σ, T) 对。
-
Theta 单位选择「天」时,输入 -0.016 表示每日衰减 $0.016;选择「年」时,输入 -5.84 表示年化衰减 $5.84。
+
勾选 Theta:启动联合优化。引擎在 T ∈ [1/365, 3年] 范围内做二维网格搜索,对每个候选 T 用 Delta 求解 σ,然后评估 Theta 匹配度。最后通过梯度下降精修 (σ, T) 对。
+
Theta 单位选择「天」时,输入 -0.016 表示每日衰减 $0.016;选择「年」时,输入 -5.84 表示年化衰减 $5.84。
-
2. Theta 与 T 的数学耦合
-
Θ ≈ -S·N'(d₁)·σ/(2√T)
+
2. Theta 与 T 的数学耦合
+
Θ ≈ -S·N'(d₁)·σ/(2√T)
Theta 与 √T 成反比。给定 S、σ、Theta,可以唯一确定 T。这是从时间衰减反推剩余期限的理论基础。
-
3. 简化模型说明
+
3. 简化模型说明
本引擎采用 r=0, q=0 的简化 BSM 模型,适用于期货期权等无利率调整场景。公式简化为:
-
d₁ = [ln(S/K) + 0.5σ²T] / (σ√T) · C = S·N(d₁) - K·N(d₂)
+
d₁ = [ln(S/K) + 0.5σ²T] / (σ√T) · C = S·N(d₁) - K·N(d₂)