From 58fcf4d1326eae93490f7f92300f1f18c4a6341e Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Wed, 1 Dec 2021 00:08:39 -0800 Subject: [PATCH] Include a chart of the probabilities over time --- market-simulator/package.json | 1 + market-simulator/src/components/Simulator.vue | 103 ++++++++++++------ market-simulator/yarn.lock | 5 + 3 files changed, 77 insertions(+), 32 deletions(-) diff --git a/market-simulator/package.json b/market-simulator/package.json index 56b8a5f0..36aa0b9f 100644 --- a/market-simulator/package.json +++ b/market-simulator/package.json @@ -7,6 +7,7 @@ "serve": "vite preview" }, "dependencies": { + "chart.js": "^3.6.1", "daisyui": "^1.16.0", "firebase": "^9.4.1", "vue": "^3.2.16" diff --git a/market-simulator/src/components/Simulator.vue b/market-simulator/src/components/Simulator.vue index 6cca3374..60a8e5ae 100644 --- a/market-simulator/src/components/Simulator.vue +++ b/market-simulator/src/components/Simulator.vue @@ -4,47 +4,56 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Order #Yes bidNo BidYes WeightNo WeightImplied ProbabilityYes PayoutNo PayoutYes ReturnNo Return
{{ i + 1 }}{{ entry.yesBid || '' }}{{ entry.noBid || '' }}{{ entry.yesWeight.toFixed(2) || '' }}{{ entry.noWeight.toFixed(2) || '' }}{{ entry.prob.toFixed(2) || '' }}{{ entry.yesPayout.value.toFixed(2) || '' }}{{ entry.noPayout.value.toFixed(2) || '' }}{{ (entry.yesReturn.value * 100).toFixed(2) || '' }}%{{ (entry.noReturn.value * 100).toFixed(2) || '' }}%
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Order #Yes bidNo BidYes WeightNo WeightImplied ProbabilityYes PayoutNo PayoutYes ReturnNo Return
{{ i + 1 }}{{ entry.yesBid || '' }}{{ entry.noBid || '' }}{{ entry.yesWeight.toFixed(2) || '' }}{{ entry.noWeight.toFixed(2) || '' }}{{ entry.prob.toFixed(2) || '' }}{{ entry.yesPayout.value.toFixed(2) || '' }}{{ entry.noPayout.value.toFixed(2) || '' }}{{ (entry.yesReturn.value * 100).toFixed(2) || '' }}%{{ (entry.noReturn.value * 100).toFixed(2) || '' }}%
+
+
diff --git a/market-simulator/yarn.lock b/market-simulator/yarn.lock index 89fafdf6..5cec6957 100644 --- a/market-simulator/yarn.lock +++ b/market-simulator/yarn.lock @@ -762,6 +762,11 @@ character-parser@^2.2.0: dependencies: is-regex "^1.0.3" +chart.js@^3.6.1: + version "3.6.1" + resolved "https://registry.yarnpkg.com/chart.js/-/chart.js-3.6.1.tgz#edcb6584b8d810306f655f89538c00a4f440c58e" + integrity sha512-AycnixR0I325Fp3bqQ7wRJbkIJPwz/9IZtUBvdBWMjK5+nKCy6FZ3VejkDTtB9udePEXNt1UYoGTsNL49JoIbg== + cliui@^7.0.2: version "7.0.4" resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f"