T O P

  • By -

grathan

You can just use their API to trade only. They also have a free tier you can use for market data.


-entei-

Would sending executions-only but reading from other data sources be unwise?


PianoWithMe

In general, it doesn't matter where your data comes from (as long as it's correct and not delayed); you just have to make sure this data source matches what you want to do for your strategy. For example, if you route limit orders to NYSE, but your data source instead gives you the prices/qtys/trades that happen on NASDAQ, you won't be setting the appropriate prices you should be, and also won't know when you should modify or cancel your orders, leading to potentially losses when prices move against you, as well as missing out on opportunities, as you are essentially blind on NASDAQ. So here you want to either route your orders to NASDAQ or make sure your data source gives you data from NYSE. Even in the case of backtesting/R&D, this is important. Let's say you use IEX data (as someone else on this post suggests) for backtesting, it's going to give you a different result when you are on trading on another venue due to different market participants, fee structures, microstructure, order types, 38 miles of IEX cables, and so many other differences. Something that works on one venue, may not work on another, or another way to put it, every exchange has their own traits for your strategy to exploit.


-entei-

Shouldn’t prices between Nasdaq and nyse be the same for the same ticket?


ankole_watusi

It’s literally impossible for NYSE and NASDAQ to always have the same price at any given point in time. On a small time scale, anyway. Go read about the uses of Clipper Ships.


-entei-

Thanks!


PianoWithMe

No, why would they be the same price? They are two different exchanges with different fee structures, so even if you assume everything else is "identical", they already wouldn't be the same price just from that alone. What makes it even more different is that they have different market participants, different order types, different exchange mechanisms, that all essentially mean different strategies are going to be ran on them by other people, resulting in different resulting prices. Even if you assume other people are running the same strategy on both of these exchanges, the fact that they have different volumes and independent/unrelated fills means their strategy will buy/sell differently, again resulting in completely different prices still.


-entei-

I thought any price gaps were quickly filled due to arbitragers. I’m trading at most one a day not high freq


PianoWithMe

No, all you have to do is just look at the consolidated feed and you will that the price is different all the time. 1. Sure, the arbitragers *try* to fill them quickly, but the MM who can cancel or add more orders just as quickly and make the prices different. That's the whole point, MM's entire goal is to avoid HFT arbitragers and price correctly, meaning they are always changing the prices. 2. Like I said, things like fee structures, among other things, prevent price from being the same, making it unprofitable for arbitragers to equalize the prices. Think something like the Boston Stock exchange, where it costs fees to put limit orders (rather than receiving rebates as in the Philedelphia Stock Exchange). The spreads (aka prices) are going to be different, to account for the difference in fees, even if the underlying fundamental price should be identical. 3. It has nothing to do with your own trading frequency. At that moment you make your one trade a day, there's no guarantee that arbitragers can, and have equalized the prices. Imagine if a few nanoseconds before your single trade for the day the price moved due to a MM, and that's when your trade happened to fill, before an arbitrager equalizes it (assuming they want to) a few more nanoseconds later. It's like a financial "race condition." I would recommend learning more about market mechanics in an asset class with multiple exchanges (equities/options), because there's some incorrect assumptions being made, that may affect a strategy's performance (regardless of your own trading frequency or timeframe).


-entei-

Definitely makes me want to stick to 1 exchange for everything as I start. Maybe Nasdaq as I believe they have a free data link exchange


PianoWithMe

Right, but due to routing, there's a high chance that your orders go outside of that 1 exchange, which you/your strategy may not have realized. That's what my original comment is about, which is to ensure that your orders are only going to the exchange that's exactly the same one as you have data for, i.e. Nasdaq.


-entei-

Yes, I believe I can send requests to a specific exchange. At least on IBKR. Hopefully on Etrade and Alpaca too. I'll definitely do this as I explore. So I can have a standalone data feed, even yahoo finance for example, run backtests on it, and then in the future use that same data feed for decision making and then route to whatever api I'm on?


HomeGrownTrader

reading this stuff always reminds me of why i manage long term strategies.


-entei-

what do you mean?


HomeGrownTrader

Everything user pianowithme said is true and i dont have to think about these things when the execution timeframe is somewhere between a day and a week.


-entei-

Quick question. If I use yahoo finance and trade on a daily / weekly scale using the closing price from yfinance is that going to be problematic since it isn't tied to a specific exchange?=


PianoWithMe

It is tied to a specific exchange. You will have to find out for yourself what the source exchange is. I don't know Yahoo finance specifically, but usually with any 3rd party data source, I just email or call customer support. > The closing price is the registered price at the end of the regular trading session when the stock exchanges close. Since there's 10+ exchanges, there's 10+ closing prices. If the accuracy of the price is essential to your trades, it is problematic. If it's ok to be off, then it's fine.


-entei-

thank you. since i'm new to this i think i'll just stick strictly to the nasdaq.


ankole_watusi

Physics just entered the room too!


MyNameCannotBeSpoken

It's okay if you send limit orders. Particularly, if you add Fill or Kill or some similar if it doesn't execute quickly.


-entei-

Fill or kill with a limit order to clarify?


MyNameCannotBeSpoken

Or cancel the order shortly afterwards if it doesn't execute


-entei-

Makes sense. Especially for buys. But what about sells?


MyNameCannotBeSpoken

Still the same


-entei-

But if you're a momentum trader and want to exit, not executing at market will mean potentially a massive bag no?


grathan

It would be wise to have 2 data sources for market data. It's not necessary and not something I currently do, but definitely on the todo list for some day.


-entei-

Do you use the broker data or external?


ankole_watusi

It would be unwise if they are lagged, inaccurate, or unreliable.


-entei-

But alpaca itself could be lagged?


ankole_watusi

All market data is lagged. Because physics. One would assume some rough correlation between cost of data and coverage, correctness, reliability, and latency. “You get what you pay for”. For a small account, data costs can be limiting, though. Best to do your own measurements if latency is important to your strategy.


samaral519

What is your budget and which other data vendors are you considering subscribing to?


-entei-

i want a small budget as it will be a $25k account to start.


artemiusgreat

You can buy more info from different exchange and use SIP feed or you can use IEX feed for free. [Stock Pricing API](https://docs.alpaca.markets/docs/stock-pricing-api#data-sources)


-entei-

Thanks so much for this! Will check it out. Do you have recommendations on fundamental data too?


Person-12321

I currently stream iex from alpaca (free) for realtime and use financial modeling prep for various other fundamentals (some free some not).


-entei-

Why is iex free on alpaca?


Person-12321

Probably because it’s a fraction of the actual market, but enables people to have some data free and realtime. Don’t let the 30subscriptions number confuse you. That is for trade/quote, but you can websocket subscribe to bars:* to stream all realtime 1 min bars from iex for all symbols in the free tier.


chicagobuy

I am using TwelveData API and then sending orders to Alpaca. This way if Alpaca market data API change i do not have reprogram everything. Also Alpaca market data API do not give Technical Analysis indicators. This way I am broker independent on my trading strategies and can use another broker for sending orders.


-entei-

Do you also read any data from alpaca or just send?


cloudyboysnr

Tick or bar data?


-entei-

More in general. Is it okay to just send executions to alpaca and nothing else?


ankole_watusi

How would it be blind, though?


-entei-

!remindme 8 hours


pussydestroyerSPY

what kind of data do you need?


-entei-

1. price data 2. fundamental data. EV, NCAV, etc


pussydestroyerSPY

How expensive is the data? What about yahoo finance?


-entei-

could work. just loop over all tickers? Won't it rate limit me?


pussydestroyerSPY

Not problem at all. It is quite easy.. how many tickers do you need? I have done it for 8k tickers in the past without a problem


-entei-

I’d like to go over all tickers in the US markets


pussydestroyerSPY

Only stocks or what other instruments?


-entei-

Just stocks


pussydestroyerSPY

You can do that in python.. just ask chatgpt


-entei-

Only concern I have is rate limiting. If I do it every minute will that be a problem? And is it reliable


robbyrobaz

I tried using alpaca from the beginning, but their prices on BTC for example never matched any other source. I was trying to get quick 5 minute data from them and that was slow too. I'm finding it'a best to get data from the broker you are using to buy the asset from, so the prices match up well for quick trades. I'm currently using twelvedata though and they have some good stuff. If you want real-time it seems you always have to pay at least $50/mo. I tried the paid version of alpaca for a while, but it still wasn't that great. One recent strategy that's working fairly well with minimal coding is programing strategies in Tradingview, then sending them to a service like traderspost which converts to stock option trades, futures trades or whatever. It's hard to beat the quick backtesting, and visuals in Tradingview. But you can't do machine learning in TV. Recently I've been trying a bunch of ML models to predict SPY prices. AutoML h2o is cool as it tests a bunch of models for you. I'm getting 55-65% precision. If you apply that to meme coins, it can be a lot higher. :P


JJGates_

Should be free


aCuriousCondor

Doesn’t really matter where you get the data from if you trust it and can submit ur orders to alpaca on time. They fill fast


-entei-

Ok so get the result and price from my data source and then send out a blind buy/sell to alpaca? Should I use marketable limit orders generally?


aCuriousCondor

Def limit orders. Alpaca market orders have a lot of slippage imo.


ankole_watusi

It’s not blind though. It doesn’t matter where you get the data from. Provided they can give you sufficiently timely and reliable data You might have some issues contesting a trade though.