Skip to content

Commit

Permalink
Alter MOEX quotes timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
KonishchevDmitry committed May 5, 2022
1 parent 4c5ee82 commit 65436b2
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/localities.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,10 @@ pub fn get_russian_central_bank_min_last_working_day(today: Date) -> Date {
}

pub fn get_russian_stock_exchange_min_last_working_day(today: Date) -> Date {
if today.month() == 1 && today.day() < 4 {
today - Duration::days(4)
} else {
today - Duration::days(3)
}
// Experimentally deduced timeout. Originally was smaller, but for example in 2022 when FinEx
// ETF have been suspended, MOEX returned their price, but with day delay, so for example during
// May holidays we had quotes only for 29 april during 30 april - 4 may period.
today - Duration::days(5)
}

pub fn nearest_possible_account_close_date() -> Date {
Expand Down

0 comments on commit 65436b2

Please sign in to comment.