I've been noticing that daily crypto bars end/begin at 1am Universal Time (7pm Central Time). I've been trying to update historical data at 7:01pm and execute a rotation strategy around 7:05pm (1:05am Universal). When I do this, the rotation strategy sends in the sell signal, but isn't simultaneously sending in the buy signal of a different crypto currency. Is this because there is a difference in the local date and the date that coincides with Universal Time (i.e. Right now, it's 2/24/2024 in Central Time and 2/25/24 in Universal Time).
I could run the strategy at a different time so that the local date is the same as the Universal date, but, at the earliest, it would be at 12:01am Central Time (6am Universal Time). That's 5 hours after the Daily bar in Universal time has begun, which makes it difficult to do time-sensitive momentum trading.
...or maybe it's not sending in the Buy order because of a different issue unbeknownst to me.
I guess I should of prefaced all of that with another question...do daily bars for crypto begin at 1am Universal time?
I could run the strategy at a different time so that the local date is the same as the Universal date, but, at the earliest, it would be at 12:01am Central Time (6am Universal Time). That's 5 hours after the Daily bar in Universal time has begun, which makes it difficult to do time-sensitive momentum trading.
...or maybe it's not sending in the Buy order because of a different issue unbeknownst to me.
I guess I should of prefaced all of that with another question...do daily bars for crypto begin at 1am Universal time?
Rename
QUOTE:
do daily bars for crypto begin at 1am Universal time?
12am UTC.
Thanks Eugene. Makes sense. It slipped my mind that the Chart in backtests give the time that the bar closes, not begins. That's why I was off by an hour.
I'm running a daily rotation strategy on a dataset that includes: BTCUSDT, FETUSDT, MATICUSDT, RNDRUSDT, and SOLUSDT. It rebalances daily and selects the stock that has the highest weight value of Alpha (31 day period). The additional condition that I gave it was just EMA greater than SMA based on the Close price (31 day period). The backtest shows it should have bought FETUSDT today. I ran it yesterday in SM and only a sell order was placed for the RNDRUSDT that I was holding. No buy order though.
I ran it today at 12:06am central time and again at 7:25pm central time. I updated my dataset around 12:03am and again manually at 7:15pm.
My position size is a fixed value of 1 (200 bars) and I have plenty of BNBUSDT in my Binance account for fees.
Why didn't it send a buy order or even get a buy signal in Strategy Monitor? Yesterday, the backtest had a Sell Signal for RNDRUSDT and a Buy Signal for FETUSDT.
I'm running a daily rotation strategy on a dataset that includes: BTCUSDT, FETUSDT, MATICUSDT, RNDRUSDT, and SOLUSDT. It rebalances daily and selects the stock that has the highest weight value of Alpha (31 day period). The additional condition that I gave it was just EMA greater than SMA based on the Close price (31 day period). The backtest shows it should have bought FETUSDT today. I ran it yesterday in SM and only a sell order was placed for the RNDRUSDT that I was holding. No buy order though.
I ran it today at 12:06am central time and again at 7:25pm central time. I updated my dataset around 12:03am and again manually at 7:15pm.
My position size is a fixed value of 1 (200 bars) and I have plenty of BNBUSDT in my Binance account for fees.
Why didn't it send a buy order or even get a buy signal in Strategy Monitor? Yesterday, the backtest had a Sell Signal for RNDRUSDT and a Buy Signal for FETUSDT.
Any thoughts on what might be going on here?
Has anyone experienced the same situation when they have run a strategy in a time zone that would be the day before Universal Time’s date? I’m just trying to rule out this has the source of it not sending buy orders to Binance.
Just an update...I ran this same strategy on Kraken and the buy signals are appearing, and the orders are executing. I'll just run it on there instead.
Has anyone experienced the same situation when they have run a strategy in a time zone that would be the day before Universal Time’s date? I’m just trying to rule out this has the source of it not sending buy orders to Binance.
Just an update...I ran this same strategy on Kraken and the buy signals are appearing, and the orders are executing. I'll just run it on there instead.
To answer your question we need to find out more. Does this happen with other kinds of Strategies (support for Rotation Strategies in the SM has just been recently introduced)?
Data is everything.
Can someone in N. America verify the timestamp of the Binance Daily data requested at 12:00:01 am UTC?
Can someone in N. America verify the timestamp of the Binance Daily data requested at 12:00:01 am UTC?
QUOTE:
To answer your question we need to find out more. Does this happen with other kinds of Strategies (support for Rotation Strategies in the SM has just been recently introduced)?
Not sure. I only run one other Rotation Strategy and don’t set that one to auto-place. That one produces signals like it should though.
I hate Binance.US anyway so this isn’t that big of a deal. Kraken is fine if Coinbase isnt an option. I’ve set the Rotation Strategy to run again tonight at 6:05pm Central Time (12:05am UTC) so we’ll see if it sends the correct orders to Kraken again. I’m starting to suspect that my issue was possibly the position size I chose. I originally chose Fixed Value=1. I never tried a larger quantity with Binance before moving on to Kraken. However, Binance never produced an error in Log Viewer. When I ran it with Kraken, it produced a trade volume error with that position size. So I changed it to Fixed Value=8 and it worked just fine. I was just trying to trade the absolute smallest size possible just to confirm everything is working properly. One thing that I’ve noticed about Kraken though is it takes 20-60 seconds for it to process a rotation strategy (loading 5 symbols, 200 bars) in SM. My other rotation strategy (same # symbols and bars) that pulls data from IQFeed takes about 3-10 seconds to complete.
Re: Kraken
What's in the Strategy Monitor Log?
If you're polling for data, Kraken will be quick for the first 6 or 7 symbols, then you get throttled - for 20 seconds before the next request. The time it takes to RUN the strategy isn't dependent on the Providers; it's dependent on the Provider updating the data.
That said, if it's commonly take 40 or 50 seconds, that sounds like at least one of the symbols isn't updating => check the Log.
What's in the Strategy Monitor Log?
If you're polling for data, Kraken will be quick for the first 6 or 7 symbols, then you get throttled - for 20 seconds before the next request. The time it takes to RUN the strategy isn't dependent on the Providers; it's dependent on the Provider updating the data.
That said, if it's commonly take 40 or 50 seconds, that sounds like at least one of the symbols isn't updating => check the Log.
It seems like the strategy has been a little quicker lately. Here is the log...
2/27/2024 14:09:32: Running Now
2/27/2024 14:09:34: Status = Processing
2/27/2024 14:09:34: Pass 1 - Requesting updates for 5 symbols...
2/27/2024 14:09:57: Pass 1 - UpdateHistories returned 0 symbols
2/27/2024 14:09:57: Ran Strategy on MATICUSD,SOLUSD,XXBTZUSD,RNDRUSD,FETUSD: 0 Signals, Run Time=82ms
2/27/2024 14:09:57: NextRun set to 2/27/2024 18:06
2/27/2024 14:09:57: Status = Completed
2/27/2024 14:09:57: Processed all Symbols
All five symbols are updated just fine.
My Daily strategy doesn't rely on it running super fast, so 20-60 seconds is fine with me. I have it set to run at 6:06pm Central so we'll see what happens.
Obviously, the bar for 2/27/24 hasn't completed yet. What I'm not understanding though is... I right-clicked and chose "Run Now". SM doesn't show any signals. However, if I run a backtest, the backtest is correctly showing two signals based off of the 2/26 bar. I would have thought that anytime between the 2/26 bar completing and the 2/27 bar completing, running it in SM would produce the same two signals that I'm seeing in the backtest. When I ran it around 8pm Central yesterday, it produced a buy signal for RNDRUSD. I would expect that buy signal anytime I ran the strategy in between 6:01pm Central yesterday to 5:59pm today. It's not doing that though. Am I doing something wrong or am I misunderstanding how this works?
2/27/2024 14:09:32: Running Now
2/27/2024 14:09:34: Status = Processing
2/27/2024 14:09:34: Pass 1 - Requesting updates for 5 symbols...
2/27/2024 14:09:57: Pass 1 - UpdateHistories returned 0 symbols
2/27/2024 14:09:57: Ran Strategy on MATICUSD,SOLUSD,XXBTZUSD,RNDRUSD,FETUSD: 0 Signals, Run Time=82ms
2/27/2024 14:09:57: NextRun set to 2/27/2024 18:06
2/27/2024 14:09:57: Status = Completed
2/27/2024 14:09:57: Processed all Symbols
All five symbols are updated just fine.
My Daily strategy doesn't rely on it running super fast, so 20-60 seconds is fine with me. I have it set to run at 6:06pm Central so we'll see what happens.
Obviously, the bar for 2/27/24 hasn't completed yet. What I'm not understanding though is... I right-clicked and chose "Run Now". SM doesn't show any signals. However, if I run a backtest, the backtest is correctly showing two signals based off of the 2/26 bar. I would have thought that anytime between the 2/26 bar completing and the 2/27 bar completing, running it in SM would produce the same two signals that I'm seeing in the backtest. When I ran it around 8pm Central yesterday, it produced a buy signal for RNDRUSD. I would expect that buy signal anytime I ran the strategy in between 6:01pm Central yesterday to 5:59pm today. It's not doing that though. Am I doing something wrong or am I misunderstanding how this works?
Sounds like a bug. We'll have to look into it.
Just want to give you the most information I can to help you solve this.
I ran the strategy tonight at 6:06pm Central. It executed the Sell Correctly. It didn't execute the Buy order ($8 worth of FETUSD) because of this error: "Kraken Broker: Error Placing Order: EGeneral:Invalid arguments:volume". I'm going to throw in maybe $50-$100 into the account to see if I can't avoid that issue tomorrow. So, it looks like it is working as long as I have enough capital in there and as long as I put the order in between 6pm and 11:59pm Central Time. After midnight, the Strategy Monitor won't produce any signals/orders for the strategy until 6pm Central comes around again. Kind of bizarre.
I ran the strategy tonight at 6:06pm Central. It executed the Sell Correctly. It didn't execute the Buy order ($8 worth of FETUSD) because of this error: "Kraken Broker: Error Placing Order: EGeneral:Invalid arguments:volume". I'm going to throw in maybe $50-$100 into the account to see if I can't avoid that issue tomorrow. So, it looks like it is working as long as I have enough capital in there and as long as I put the order in between 6pm and 11:59pm Central Time. After midnight, the Strategy Monitor won't produce any signals/orders for the strategy until 6pm Central comes around again. Kind of bizarre.
I posted the wrong screenshot and the website only lets me delete the screenshot, not replace it. I'll reply again to post the correct screenshot.
Really there were no issues then.
Re: error: "Kraken Broker: Error Placing Order: EGeneral:Invalid arguments:volume"
You probably know it, but cryptos have a required minimum volume for orders.
https://support.kraken.com/hc/en-us/articles/205893708-Minimum-order-size-volume-for-trading
FETUSD is trading about 1.07, so the minimum USD size would be 20 x 1.07 = $21.40.
Re: error: "Kraken Broker: Error Placing Order: EGeneral:Invalid arguments:volume"
You probably know it, but cryptos have a required minimum volume for orders.
https://support.kraken.com/hc/en-us/articles/205893708-Minimum-order-size-volume-for-trading
FETUSD is trading about 1.07, so the minimum USD size would be 20 x 1.07 = $21.40.
So SM not producing signals in between 12:01am-5:59pm Central Time for a daily strategy (that is producing signals in a backtest) is how it’s supposed to function? I would think it’d at least produce a signal if there was one from the previous bar.
We’re going to investigate this. we have an open issue in our tracking system.
QUOTE:I was just referring to what you said in Post #10.
Really there were no issues then.
We think this was a result of the other bug you reported about the Rotation Indicator switcharoo
Should be fixed for Build 83 too.
Should be fixed for Build 83 too.
Your Response
Post
Edit Post
Login is required