Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Implement spread #163

Open
vikiival opened this issue Mar 9, 2023 · 2 comments
Open

Implement spread #163

vikiival opened this issue Mar 9, 2023 · 2 comments

Comments

@vikiival
Copy link
Member

vikiival commented Mar 9, 2023

To the series insight we can implement spread.

What is spread?

the difference or gap between two prices, rates, or yields

We would count it as a difference between lowest LIST and lowest BUY

LAST BUY: 131 KSM
LAST LIST 130.74 KSM

Formula:

const top = Math.abs(LIST - BUY)
const bottom = (LIST + BUY) / 2
const diff = (top / bottom) * 100

SOURCE

ht/ @yangwao

@roiLeo
Copy link
Contributor

roiLeo commented Mar 22, 2023

Where are the SQL wizards when we need them? 🧙

@vikiival
Copy link
Member Author

Sending one cute witch for you 💜

out-2-62

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants