Published
Edited
Jan 3, 2021
2 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
deltaP = (1 + priceChangeA) / (1 + priceChangeB)
Insert cell
impermanentLoss = {
const rA = assetRatio, rB = 1 - assetRatio
return 1 - Math.pow(deltaP, rA) / (rA * deltaP + rB)
}
Insert cell
Insert cell
html`<style>
body, html { box-sizing: border-box; }
* { box-sizing: inherit; }

body input[type=text],
body input[type=number] {
font-size: 18px;
border: 4px solid transparent;
border-bottom: 1px solid #c0c0c0;
padding: 4px;
padding-bottom: 7px;
min-width: 24px;
width: 8em;
}

table.borderless td {
border: 0;
padding: 8px 2px;
}

</style>`
Insert cell
Insert cell
import { form } from '@mbostock/form-input'
Insert cell
import { slider } from '@jashkenas/inputs'
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more