Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: rule based auto order #340

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

feat: rule based auto order #340

wants to merge 2 commits into from

Conversation

Senna46
Copy link
Contributor

@Senna46 Senna46 commented Oct 25, 2023

Auto order

If an automatic order is enabled, the automatic order is placed based on the following formula

$$ h_{t} = h_{t}-\bar{h_{t}} = h_{t}-\hat{S_{m}}(1-\frac{t}{T}) $$

$$ p_{t} = p_{t-1} (1-\alpha b_t / {\frac{\hat{S_{m}}}{T}}) $$

$$ \hat{S_{m}} = r S_{m-1} $$

$T$:Total number of days in the month (28, 30 or 31)
$S_{m}$:Total amount consumed this month 𝑚
$\hat{S_{m}}$:Estimated total amount consumed this month 𝑚
$h_t$:Token balance at day 𝑡
$\bar{h}_t = \hat{S} (1-\frac{t}{T})$:Approximate tokens balance at day 𝑡
$b_t$:Desired amount to buy/sell at day 𝑡
$r$:Seasonal adjustment rate
$\alpha > 0$:Learning rate

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

Successfully merging this pull request may close these issues.

1 participant