-
Notifications
You must be signed in to change notification settings - Fork 136
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
Trading After Hours #32
Comments
Can I have more details about what we want to achieve exactly? The first thing I think of is to use the lifecycle method after_market_closes but maybe we want a more complex behavior. |
This is an interesting point. I'm wondering if an override in the This can come up too when clients just want to set the times they trade. I've had clients not want to have their algo trade during lunch. |
I wonder if we couldn't have an option for the user to create a parameter dictionary that would give hours (and maybe days) where trading is permitted or excluded. These could have labels for the keys. For example:
We could then layer this logic over the |
When I was speaking with santayan (out past student who’s adding crypto
trading to lumibot), he had a good point: crypto does not have open or
close times at all. We definitely need to be able to accommodate for this
too.
On Sat, Apr 10, 2021 at 4:28 PM Neil Murphy ***@***.***> wrote:
I wonder if we couldn't have an option for the user to create a parameter
dictionary that would give hours (and maybe days) where trading is
permitted or excluded. These could have labels for the keys. For example:
trading_hours = dict(
late_start=dict(
start=datetime.time(0, 0),
end=datetime.time(9, 35),
trading=False,
),
lunch=dict(
start=datetime.time(11, 45),
end=datetime.time(13, 15),
trading=False,
)
)
We could then layer this logic over the is_market_open logic to determine
market openness.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#32 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIYQK74W2IZKI6QJEOP5IDTICYFVANCNFSM42R3IOFQ>
.
--
Robert Grzesik 347-635-3416
|
@grzesir Is this matter specific to crypto trading or are there some stocks that can be traded outside opening hours. @neilsmurphy I think it is possible to add the dictionary |
Is this feature implemented? If so, any doc on it? |
What are you looking to accomplish? self.set_market(“24/7”) - usually in
initialize() - will allow your bit to trade 24/7. Then you can put if
statements in the on trading iteration checking self.get_datetime()
Robert Grzesik 347-635-3416
…On Thu, Mar 14, 2024 at 12:43 AM Ben Chuanlong Du ***@***.***> wrote:
Is this feature implemented? If so, any doc on it?
—
Reply to this email directly, view it on GitHub
<#32 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIYQK4IKZIFQSA4A6JR6RTYYETIVAVCNFSM42R3IOF2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJZGYZTSOJTGM3Q>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
How can we trade stocks after hours?
The text was updated successfully, but these errors were encountered: