Portfolios / Sub-accounts

Sub accounts is definitely on Alpaca’s active feature request list. No ETA but will keep everyone posted.

There are a few issues and subtleties which arise with multiple accounts. One is with day trading. Sub-accounts would typically be considered separate accounts. According to FINRA day trading rules

you can’t use a cross-guarantee to meet any of the day-trading margin requirements. Each day-trading account is required to meet the minimum equity requirement independently, using only the financial resources available in the account.

In live trading, this rule would require a minimum of $25,000 in each sub-account which a user wishes to day trade. Not an issue in all cases but something to be aware of.

3 Likes

Don’t implement as separate accounts. That will be a mess with margin etc. Instead, create multiple views into a single account.

bump. this would be an excellent feature.

1 Like

@hitoshi you gonna make us wait another year ?

1 Like

+1

I have been meaning to move my robinhood funds (trading using the unofficial api) into alpaca, however I’ve been waiting on two features. 1) fractional shares…which got introduced recently and 2) subportfolios. I hacked together a way to handle multiple portfolios with the RH api, but it’s a ton of moving pieces that I’d prefer my code wasn’t responsible for.

I’ll second/third this.

I’d really like to be able to have multiple accounts (with a single login). Schwab technically allows for unlimited accounts but realistically you can have 6 before you have to call and talk to someone to open more.

+1! Please add this ability :pray:

One way to do this is to tag the trades with a strategy/subaccount label when submitting your orders to Alpaca. You can then slice and dice your Alpaca account by label in Feather Finance, our portfolio management app. We have recently integrated the Alpaca API.

Here are the steps to follow:

  1. Signup for Feather Finance (it’s free, and we plan to always have a free tier)
  2. Link your Alpaca account(s) to your Feather Finance account via OAuth.
  3. Prefix a label to the client_order_id you send to Alpaca. Use different labels for your different trading strategies.
  4. Your transactions will feed automatically into Feather Finance, and they will be tagged with the corresponding label.
  5. Analyze the performance of each algo in Feather Finance by filtering by label.

Would love to get some feedback if this is useful to you. Don’t hesitate to reach out!

Note that you can also retrieve daily P/L and time weighted returns on specific strategies/labels via API by using our “portfolio/history”:

Here is a link to the google sheet in the video:

Yes, I would expect the PDT rule to apply to each subaccount.

indeed, which is why it makes sense to trade all your strategies in one account, while at the same time tagging each trade with a strategy label in order to filter the portfolio and analyze it by strategy.

I used to do that in MQL/MT4. You can do apply comments and ‘magic numbers’ over there. I liked that platform, but forex got killed for the US and MT4 had other drawbacks, anyway.

I’m brand new here, though. I see that positions are shown in aggregate, rather than individually. Is it that I need to read filled orders? I thought they didn’t show after fill, but I wasn’t worried about it because I was only planning on working with aggregated positions.

Yes, positions are aggregated: e.g. if you buy 100 shares of ABC and a week later buy another 200 shares of ABC, Alpaca shows that your account is long 300 shares.

If these two purchases belong to two different trading strategies, you could tag each order with labels representing their respective trading strategy, and use a portfolio management app to analyze the evolution of the PL of each strategy by filtering by label (see above post).

+1 to this… $25k per account no problem.

I was wondering if there was any update on this?

I’m able to push orders with unique identifiers with “client_order_id=”

However, once it is converted into a position I’m not sure how to retrieve the order ID. How are people keeping their different strategy trades separated once they become a position?

1 Like

+1

I’m using Alpaca to backtest strategies on a paper account using the same ETFs and this would save a bunch of coding!

Thanks Xavier , I think this is a good idea in theory and would allow me to separate the different strategies, but also here, the devil is in the details: I have seen some corporate actions that result in transactions that I didn’t initiate. The assigned user ID is random and I would not know which portfolio / strategy these belongs to. While these are few, it would still result in a lot of effort to sort them out, which is needed to have all transactions balanced for each strategy - for quality control.

Hi @nthorwir, thanks for bringing new points to the discussion. Would you mind elaborating bit more on the corporate action you have in mind? Since corporate actions occur on live positions that can themselves be attributed to each strategy, I don’t expect them to be that problematic.

For example:

  1. If the corporate action occurs on a security that is held exclusively by algo1, it would be easy to tag the algo1 label to the activities representing the corporate action. The effect of the corporate action would thereby only impact algo1 in Feather Finance (we model each strategy’s portfolio based on all the activities tagged with that strategy).

  2. If instead the position is shared by several algos, then corporate action activities would need to be duplicated and the amounts would pro-rated according the each algo’s position.

You are right to say that it would currently involve a manual process, but the mechanics should be pretty straightforward (couple minutes max). We do have a few Alpaca users who tag strategy labels. If more users start using the feature we could even consider automating the manual process.

Thanks,
Xavier

Xavier,
thanks for a quick reply. I am thinking of e.g. splits, rights issue, symbol changes and mergers. I can believe that each of these can be attributable to the correct strategy as you point out and that it possible to reconstruct the holdings at a given point for each strategy. But it took me more than a couple of minutes each to identify the issue, find the details on what happened, correct the transactions, verify success and to make sure that the correction does not interfere with calculations such as profit per transaction etc.
How do you apply these so quickly ? Is there a general recipe or semi automation?

TLDR
@nthorwir I see what you mean. I think it helps split the question/problem in two: (1) portfolio issues caused by corporate events in and of themselves (regardless of subportfolios/labeling techniques), and (2) their implications on labeling strategies. When I said “couple minutes max”, I was referring to the additional work involved to make sure strategies remain well labeled on a typical corporate action.

Issues Caused by Corporate Events
I agree with you that it is often tricky to troubleshoot portfolio issues when there’s an ongoing corporate action on one of its holdings. The main problem is that complex corporate events (like spin-offs) don’t impact the portfolio all at once, as one “atomic” event. Instead the portfolio can transition through several (incomplete) states: corporate event’s ex-date, date at which symbol trades at post-event price, corporate event’s pay date, date(s) at which the broker (partially/fully) reflects the corporate event in the user’s portfolio… For the broker & the clearing house, the only real deadline by which everything needs to be in order in the user’s portfolio is several days later, when the corporate event settles (when hard money & cusips exchange hands at the clearing house…

If it makes you feel any better, I know for a fact that traders at top financial institutions face some of the same problems.

While there is no silver bullet to guard against such issues, portfolio management tools can help you troubleshoot these issues faster (e.g. trading desks at investment banks use such tools every day to reconcile their P/L):

  • P/L Attribution Tool (see thread)
  • Filtering by Symbol (see thread)
    • e.g. if you’re analyzing the impact of LB splitting into BBWI & VSCO, you can filter on a set of symbols (LB / BBWI / VSCO) and look at the evolution of that subset of your portfolio.
  • Temporarily Disabling Transactions / Inserting Temporary Transactions
    • If a corporate event has been partially processed it can be helpful to temporarily disable / temporarily add a transaction in your portfolio to put it in a more consistent state while waiting for other

Implications for Labeling
You raise a good point that any portfolio activity that isn’t directly initiated by you won’t be labeled automatically. That’s true of corporate events activities, but also of e.g. TAF & REG fees.

The way I see it, tagging your strategies only gives you more info to troubleshoot your portfolio issues. E.g. your labels will point you to which strategy is affected by the issue. I am not saying that labeling will always be effortless. If your trading strategies involve holding positions on many different symbols, there will come a time when a particularly thorny corporate event makes you reconsider the fact that you not only have to troubleshoot the issues caused by the corporate event, but also keep your strategy labels updated throughout that mess. However, over the long run, I think the benefits will outweigh the additional work for many of us.

Thanks Xavier for another helpful reply.
The resolving of corporate actions and attribution are of course separate issues and I can see how the latter is easier - good point.

If it makes you feel any better,
I know for a fact that traders at top financial institutions face some of the same problems.

It kinda does :slight_smile:

Definitely agree that tagging is the a good idea to enable flexibility in the future.