We built the trading plan algorithm to save advisors hours of manual work. Typically, an advisor dealing with equity compensation will spend analyzing how to diversify out of a concentrated equity position, especially when factoring in complex constraints like cash flow, AMT, tax exposure, and timing.
These hours can add up when you have multiple clients with these types of holdings. On top of that, plans need constant updating when things don't go according to plan. A change in the stock price, an IPO, or, most commonly, a client not doing what you told them to do, can throw everything off.
On average, the algorithm cuts down over two hours of planning time, while also reducing the risk of human error. It’s designed to give you a high-quality, editable draft of a trading plan, or if it looks good on review, you can deploy it as-is without making changes.
The algorithm takes into account a wide range of inputs: client preferences (such as budget, legacy share targets, prioritization of grants, disqualification preferences, and planning horizon), detailed cash flow information (including income, expenses, grants, and paychecks), equity specifics (types, companies, expiration dates, growth expectations, and bargain elements), and tax-related data (filing status, state residency, and available tax credits).
Based on these inputs, the algorithm generates a full trading schedule that includes transaction dates, detailed tax and return estimates, and ensures all events fall within company trading windows. It also flags potential issues like forfeited or underwater shares, unmet constraints, or incomplete plans. Once created, the plan can be frozen to lock it in place and so further calculations can be made. You can even build and compare multiple plans using different parameters with side-by-side visual comparisons through charts and metrics to guide the decision-making process.
Now that you know why we built it, let's look at how it actually works.
How the algorithm works
Gemifi’s algorithm helps to optimize your Stock Awards, Stock Options and RSUs (Restricted Stock Units) by making smart decisions to reduce taxes and risks. Similar to a Monte Carlo analysis, it will run thousands of scenarios and analyze to determine the most tax efficient manner to exercise, sell, and hold various types of equity to determine the most efficient way to exit your concentrated positions.
Here’s how it works:
1. Analyzes Which Options to Exercise
The algorithm follows this order for exercising shares:
Incentive Stock Options
Non-Qualified Stock Options
You can't sell options before exercising, so the algorithm will analyze which of your options make the most sense to exercise and either sell or hold until they qualify for LTCG treatment of a qualified disposition of ISOs.
Often time the algorithm will sell NQSOs immediately after exercising them because you have already paid the taxes on the value of the options. You would only qualify for LTCG treatment on the difference between the FMV at exercise and the FMV one year later from exercise (which is usually not nearly as large as the difference between the exercise price and FMV at exercise).
Regarding ISOs, the algorithm will do its best to exercise and hold those long enough to qualify for LTCG / qualified dispositions of said ISOs, but if you don't give the algorithm enough years to allow that to happen (e.g. a 1 or 2 year exit) or if there isn't enough other equity to exit to permit the holding of these shares long enough, then they will be disqualified in order to exit the position in a timely fashion. You can override the disqualification of ISOs in the trading plan constraints by limiting the number of shares that are permitted to be disqualified.
2. Analyzes Which Held Shares to Sell
Qualified ISOs
RSUs that qualify for LTCG
NQOs that qualify for LTCG
RSUs that qualify for STCG
NQOs that qualify for STCG
Disqualifiable ISOs
It prioritizes selling shares that qualify for long-term capital gain (“LTCG”) treatment over those that generate ordinary income or short-term capital gain treatment, naturally. We want to hold onto ISOs until they qualify for qualified dispositions, so we'll get those out first, then the LTCG shares, then STCG shares, then if we have to, we'll disqualify ISOs before they make it across their time based finish lines.
If you give the algorithm shorter time constraints, it will have to move down this list into the less tax efficient trades sooner. In other words, it may sell shares or disqualify ISOs in an effort to exit within the time frame you’ve given. For example, if you only give it 1 year to sell shares, it will disqualify all of your ISOs. But if you give it more time, it will exercise ISOs and then hold them long enough for a qualified sale.
3. Analyzes Which Held Shares to Hold
Not all clients will be able or willing to sell 100% of their position in their firm. They may be an executive, or only have access to a secondary sale, or have shares that continue to vest after the trading plan is functionally complete, etc. Either way, the Legacy Shares will be a feature utilized by many clients and advisors when building a plan.