Skip to content

Commit c48a37d

Browse files
committed
small VaR-related comments
1 parent 8ab8cfb commit c48a37d

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

Probability/MDP/Risk.lean

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ def rangeOfRV (X : FinRV n ℚ) : Finset ℚ := Finset.univ.image X
1313

1414
/-- Value-at-Risk of X at level α: VaR_α(X) = min { t ∈ X(Ω) | P[X ≤ t] ≥ α }.
1515
If we assume 0 ≤ α ∧ α ≤ 1, then the "else 0" branch is never used. -/
16-
1716
def VaR (P : Findist n) (X : FinRV n ℚ) (α : ℚ) : ℚ :=
1817
let S : Finset ℚ := (rangeOfRV X).filter (fun t => cdf P X t ≥ α)
1918
if h : S.Nonempty then
@@ -22,6 +21,9 @@ def VaR (P : Findist n) (X : FinRV n ℚ) (α : ℚ) : ℚ :=
2221
0
2322

2423
notation "VaR[" α "," X "//" P "]" => VaR P X α
24+
-- TODO (Marek): What do you think about :
25+
-- notation "VaR[ X "//" P "," α "]" => VaR P X α
26+
-- I think that the α goes better with the probability that the variable
2527

2628
theorem VaR_monotone (P : Findist n) (X Y : FinRV n ℚ) (α : ℚ)
2729
(hXY : ∀ ω, X ω ≤ Y ω) : VaR P X α ≤ VaR P Y α := by
@@ -66,6 +68,10 @@ def CVaR (P : Findist n) (X : FinRV n ℚ) (α : ℚ) : ℚ :=
6668
else
6769
num / den
6870

71+
-- NOTE (Marek): The CVaR, as defined above is not convex/concave.
72+
-- See Page 14 at https://www.cs.unh.edu/~mpetrik/pub/tutorials/risk2/dlrl2023.pdf
73+
-- NOTE (Marek): The CVaR above is defined for costs and not rewards
74+
6975
notation "CVaR[" α "," X "//" P "]" => CVaR P X α
7076

7177
--TODO: prove...
@@ -75,4 +81,5 @@ notation "CVaR[" α "," X "//" P "]" => CVaR P X α
7581
-- convexity
7682
-- CVaR ≥ VaR: CVaR[α, X // P] ≥ VaR[α, X // P]
7783

84+
7885
end Risk

0 commit comments

Comments
 (0)