Griff's values

This commit is contained in:
dapplion 2019-08-11 21:33:00 +02:00
parent ec41af9dad
commit 03a4d3b342
2 changed files with 119 additions and 1 deletions

View File

@ -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;

114
src/u_values.tsx Normal file
View File

@ -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
];