Code Monkey home page Code Monkey logo

portfoliodrawdownmontecarlo's Introduction

Portfolio Drawdown Monte Carlo Simulation

Run a Monte Carlo simulation of a portfolio drawn down during retirement and visualize the results.

Live

This runs live at https://pettijohn.github.io/PortfolioDrawdownMonteCarlo/

Current status: Janky visualization on configurable inputs.

Backlog

  • Accept inputs!
  • Add basic "computing..." / "done" text !!! Background thread work?
  • Add dollars next to portfolio amounts
  • Add visualization, normalized to today's dollars
  • Add visualization, probability you didn't run out of money
  • Make the colors not horrible
  • Explain what you're looking at
  • Allow saving to localStorage
  • Allow sharing with query string parameters
  • Consider snowpack instead of deno bundle

Lessons Learned

  • To import a Node package, use a deno-friendly CDN, which does all the translation on the backend: import { Chart, ChartItem, registerables } from "https://esm.sh/[email protected]"; Don't include ?target=deno - the CDN returns the appropriate format depending on user agend (Deno for deno, es20xx for browsers).
  • To compile Deno with DOM compatibility, set the lib property in deno.json, and set deno.config to the same path in .vscode/settings.json to enable the linter to use the property. See Targeting Deno and the Browser
  • JSX is not automatically resolved, import React each time. (This partially worked, until I tried extends React.Component, then it couldn't find the name React.)
  • Deno bundle does not include source maps for attaching debugger - use this for development https://deno.land/x/deno_bundle
  • Versioning hell is real. Add ?pin=v74 to (pin the esh.sh build version)[https://esm.sh/#pin-the-build-version]
[ERROR]: Type 
'import("https://cdn.esm.sh/v71/[email protected]/types/index.esm.d.ts").ChartData<"line", number[], unknown>' 
is not assignable to type 
'import("https://cdn.esm.sh/v74/[email protected]/types/index.esm.d.ts").ChartData<"line", number[], unknown>'.
Types of property 'datasets' are incompatible.

portfoliodrawdownmontecarlo's People

Contributors

pettijohn avatar

Watchers

 avatar James Cloos avatar

Forkers

mcsheaj

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.