I have $30K yet pattern day trading protection is occuring


I tried to liquidate a position using the web GUI on a paper trading account. It would not let me, apparently because it thinks I am a pattern day trader (PDT). I have $30K in my paper account therefore PDT should not occur.

Is this a bug? Or is there something in the fine print about the PDT rule. My bot has made a fairly high number of trades today - less than 100, more than 3 - I can dig in if you need the exact number. Thus, if I had less than $25K it is extremely likely that PDT should kick in. But I have more than $25K.


@Dan_Whitnable_Alpaca much appreciated if you might have any thoughts here?

If I can’t trust the paper api to let me trade when I have enough money to be exempted from the PDT rule, then I’m less prone to trust it with real money.

Ah, I finally figured out how to post a screenshot which I tried to do with my original post.

The first screenshot shows why I think I have the required greater than $25K balance (i.e. my balance being ~$30.5K).

The second screenshot shows why I think the reason my attempt to liquidate failed bc Alpaca thinks I am (a) subject to the PDT rule (b) violating PDT.

I agree with (b). I disagree with (a). Plus the total amount I have in stocks is no more than $3K.

I think this is just a warning, like, it’s saying it has potential to trigger a risk check. but even in the event is triggered, they will see opening nav and closing nav > $25k and you will get unflagged.

@yoyodyne I’ll start with the warning about liquidating positions. @dynamic3 is correct that it is just a warning and can typically be ignored if your account equity is over $25,000. Placing an individual trade looks at the account equity and doesn’t display that message. That message shows up when liquidating stocks from the dashboard ‘Positions’ tab as shown below

It is a bit startling (and confusing). I’ve submitted a feature request to not display that when not applicable. Until then one can ignore if your equity is above $25,000 and you have enough Day Trading Buying Power (if any are day trades).

I’ll clarify the caveat around having enough Day Trading Buying Power (DTBP). That may not have been the specific issue in this case but there is a lot of confusion around this point and others may find a bit of explanation helpful.

There are several ‘protections’ which Alpaca provides which get lumped under “PDT Rules” but are completely separate. The SEC regulates which accounts can day trade and the amount of funds one can use to day trade. All brokers, including Alpaca, are required to enforce these regulations/restrictions. An overview of the SEC PDT regulations can be found here. FINRA further clarifies this here

First is the definition of a day trade. Basically if one buys and sells, or sells and buys, the same stock in the same day that is a day trade. There are nuances around how Day Trades are counted and FINRA leaves it up to the individual broker. Specifically, if one buys, then executes two sell orders is that one or two day trades? Alpaca counts that as one Day Trade. If one buys, then sells, then sells, then buys, then sells (the same stock in the same day) that would be considered only two day trades.

Why does this matter? The SEC requires that any margin account which executes 4 or more day trades within 5 business days be designated “pattern day trader” (PDT). This isn’t a good thing or a bad thing. It’s just an account designation. However, it has ramifications. First and foremost is that this designation is permanent. Once an account is designated PDT it remains that way forever (one can get a ‘one time exemption’ but assume it permanent). The downside to having a PDT designation is one must maintain $25,000 in an account to trade. Technically one must maintain $25,000 in the account to day trade, but Alpaca expands on this to limit one from entering into new, or increasing current positions. The upside to having a PDT designation is one is afforded up to 4x margin for day trades.

So, that brings up the first ‘PDT protection’. If one’s equity is below $25,000 you will be blocked from executing more than 3 day trades in a 5 day window. The rationale is simple. If you did, then the account would be flagged PDT but, since it has less than $25,000 in equity, would immediately be restricted to liquidate only. This is probably a situation most individuals want to avoid so Alpaca provides this as a protection.

The second ‘PDT protection’ is a ‘Day Trade Buying Power’ check. The SEC restricts how much ‘buying power’ an account has for day trading. This is completely separate from ‘RegT buying power’ which is how much can be used to purchase equities held overnight. The SEC defines Day Trading Buying Power (DTBP) as

four times the customer’s maintenance margin excess as of the close of business of the previous day

The maintenance margin is typically 30% of the value of equities held as of close. However, this can be as high as 100% if the equity is priced under $2.50 or in the case of leveraged ETFs. There is more detail in the docs here. Therefore, ones DTBP can be as high as 4x equity (if there are no overnight holdings) and be as low as $0 if one holds, for example, all TQQQ (a leveraged ETF). DTBP is completely dependent upon what equities were held overnight.

How does DTBP work? It’s first calculated from the previous end of day equity and maintenance margin

DTBP = 4 x previous eod excess equity
DTBP = 4 x (equity - maintenance_margin)

That is the max DTBP for the entire day. As one opens day trades the value of the day trade reduces the amount available for further day trades. As one closes the day trade (ie completes the round trip) the initial reduction is added back and made available for further day trades. As one opens day trades the DTBP is reduced. One cannot place day trades for more than the available DTBP. If one tries to place a day trade which would exceed the DTBP the order will be rejected. This is a second ‘PDT Protection’. The protection simply tries to prevent an account from exceeding the DTBP. This is enforced for all accounts and especially important for accounts with equity over $25,000. Always monitor your DTBP and never exceed that value. The ramifications are severe. The SEC requires

If a customer exceeds this day trading buying power limitation, the customer’s broker-dealer will issue a day trading margin call… If the customer does not meet the margin call by the fifth business day, the day trading account will be restricted to trading only on a cash available basis for 90 days or until the call is met.

Day Trading Margin Calls can only be met by depositing more funds into the account. They cannot be met by simply liquidating some positions as is the case for a Fed or House Margin Call. You basically need to come up with cash to deposit into the account or you will be restricted from trading. This is probably a situation most individuals want to avoid so Alpaca provides this as a protection.

One point that shouldn’t be missed. There are two separate ‘Buying Powers’. There is RegT Buying power and Day Trading Buying Power. Any funds used to open positions held overnight must not exceed RegT BP. Any funds used to open day trade positions must not exceed DTBP. It is very important to not exceed these values. Alpaca tries to put protections in place to keep this from occurring, but it is ultimately up to the trader to ensure compliance.

Exceeding buying power has consequences. If one exceeds their RegT Buying Power they will be issued a ‘Fed Margin Call’. One can satisfy the call by closing some positions, however if an account accumulates 3 Fed Calls the account will be restricted to liquidation only for 90 days. If one exceeds the DTBP as noted above, the account will be restricted to liquidation only until cash is deposited into the account to cover the call. The takeaway therefore is don’t exceed buying power.

A final point. One should really determine ahead of time if an order will result in a day trade or an overnight holding to then determine which buying power to check. There is a user configurable option to help with that.

If one expects most of the trades one makes will be for holding stock overnight, then check “Block on Exit”. One can therefore open as many positions as one wants (constrained by RegT buying power of course) and it isn’t until one tries to close a position will the DTBP be checked. The downside of this is one could have a number of open positions and be prohibited from exiting the same day. To avoid that, and if one expects to day trade, then check “Block on Entry”. This checks DTBP before an order is submitted and will reject the order if DTBP is exceeded. The downside, of course, is one could have $0 DTBP and perhaps $10,000 RegT Buying Power, and then be blocked from opening any new positions even if one were planning on holding overnight.

Hope that all makes sense, and as mentioned, this may not have been the original issue but may help clarify for others.

Thanks, okay maybe it was only a warning about potential PDT that did not apply to me.

But, the trade I “manually” asked for did not appear to go through. That is the real problem. So, sure, we’ve just determined that PDT protection was not the reason my order did not happen.

So, I still do not know why the trade did not go through.

I wish I could tell you more about that particular manual trade, but alas I can’t. I don’t remember what stock it was nor the exact time.

Anyway, the main point is that

(a) there are many cases when my bot tries to make a trade and it appears not to happen. (rough order of magnitude is 1 in 500 trades do not go through)

(b) this current thread describes a case in which I tried to make the trade manually, i.e. using the web-based GUI and it did not go through.

Is this something that “just happens”. I.e. nothing is perfect? Seems more likely that there is a bug in Alpaca or in my bot or there is some cause still unknown to me that is blocking certain trades.

If anyone has any ideas on strategies for determining why an order might fail, please let me know.