We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello,
I'm attempting to run the following code:
from tensortrade.oms.instruments import USD, Instrument from tensortrade.oms.wallets import Wallet, Portfolio from tensortrade.oms.exchanges import Exchange from tensortrade.feed.core import DataFeed, Stream from tensortrade.oms.services.execution.simulated import execute_order from tensortrade.env.default import create import tensortrade.env.default as default # Instrument and Symbol symbol = 'AAPL' AAPL = Instrument(symbol, 2, symbol) # Data Stream data = [150, 152, 153, 151, 150] # Example price data price_stream = Stream.source(data, dtype="float").rename("USD-AAPL") # Data Feed feed = DataFeed([price_stream]) # Exchange exchange = Exchange("simulated", service=execute_order)(feed) # Wallets portfolio = Portfolio(USD, [ Wallet(exchange, 10000 * USD), Wallet(exchange, 10 * AAPL) ]) # Environment env = create( feed=feed, portfolio=portfolio, action_scheme=default.actions.SimpleOrders(), reward_scheme=default.rewards.SimpleProfit(), window_size=10 ) # Testing the environment observation = env.reset() print("Initial observation:", observation) action = env.action_space.sample() next_state, reward, done, info = env.step(action) print("Next state:", next_state) print("Reward:", reward)
Every time I run the code I get the following error: Exception: No stream satisfies selector condition.
Exception: No stream satisfies selector condition.
I can't seem to figure out what I am missing and the documentation doesn't seem to cover any examples that do this kind of use case.
Thanks
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello,
I'm attempting to run the following code:
Every time I run the code I get the following error:
Exception: No stream satisfies selector condition.
I can't seem to figure out what I am missing and the documentation doesn't seem to cover any examples that do this kind of use case.
Thanks
The text was updated successfully, but these errors were encountered: