diff --git a/src/App.tsx b/src/App.tsx index 9c57043..c3c7bd0 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -40,6 +40,8 @@ import { getSum } from "./math"; import { throttle } from "lodash"; +// Data +import { u_min_t, u_max_t } from "./u_values"; // General styles import "./app.css"; @@ -273,7 +275,9 @@ export default function App() { const R_ratio = getR({ S: S - H, V0, k }) / R; u_lower = Math.max(1 - R_ratio, u_min); } - const priceGrowth = rv_U(u_lower, u_max); + let priceGrowth = rv_U(u_lower, u_max); + // #### DEMO + priceGrowth = rv_U(u_min_t[t], u_max_t[t]); const deltaR = getDeltaR_priceGrowth({ R, k, priceGrowth }); const R_next = R + deltaR; diff --git a/src/u_values.tsx b/src/u_values.tsx new file mode 100644 index 0000000..18a91ff --- /dev/null +++ b/src/u_values.tsx @@ -0,0 +1,114 @@ +const low_u = 0.97; +const high_u = 1.07; +const dump = 0.75; + +export const u_min_t = [ + 1, + 0.8, + 0.8, + 0.9, + 0.9, + 0.8, + 0.6, + 0.5, + 0.8, + 0.9, + 0.9, + low_u, + low_u, + low_u, + 0.8, + low_u, + low_u, + low_u, + dump, + low_u, + low_u, + low_u, + dump, + low_u, + low_u, + low_u, + dump, + low_u, + low_u, + low_u, + dump, + low_u, + low_u, + low_u, + dump, + low_u, + low_u, + low_u, + dump, + low_u, + low_u, + low_u, + low_u, + low_u, + low_u, + dump, + low_u, + low_u, + low_u, + low_u, + low_u, + 0.97 +]; + +export const u_max_t = [ + 3, + 1.5, + 1.01, + 1.04, + 1.1, + 1.15, + 1.15, + 1.15, + 1.1, + 1.1, + 1.2, + 1.15, + high_u, + high_u, + 1.3, + high_u, + high_u, + high_u, + high_u, + high_u, + high_u, + high_u, + high_u, + high_u, + 1.3, + high_u, + high_u, + high_u, + high_u, + high_u, + 1.2, + high_u, + high_u, + high_u, + high_u, + high_u, + high_u, + high_u, + high_u, + high_u, + 1.4, + high_u, + high_u, + high_u, + high_u, + high_u, + high_u, + high_u, + high_u, + high_u, + high_u, + high_u, + 1.04 +];