Following our previous theoretical analysis, this RoboMarkets API case study examines the real costs and practical feasibility of managing a data-driven investment portfolio.
In our previous article, Portfolio Management Costs at RoboMarkets: Cash vs. Margin Accounts, we examined trading fees, portfolio turnover, Margin Account financing, and the technical requirements of API-based portfolio automation.
This time, we go one step further.
Instead of using a simplified model, we test the RoboMarkets API on a real data-driven portfolio using its actual monthly constituents, historical stock prices, and rebalancing activity.
We compare three ways of managing the portfolio:
- manual trading on a Cash Account,
- semi-automated trading through the RoboMarkets API on a Cash Account,
- semi-automated trading through the RoboMarkets API on a Margin Account.
The study covers three initial portfolio sizes:
- $500
- $5,000
- $50,000
Our goal is to determine:
- whether all required API orders can actually be executed,
- how much each method would have cost during the observed year,
- when a Margin Account becomes technically necessary,
- and from what portfolio size a Cash Account with semi-automated API rebalancing becomes the most practical solution.
RoboMarkets Cash Account vs. Margin Account
Cash Account
A Cash Account allows the investor to use only the funds actually available in the account.
There is no financing charge. The investor primarily pays the trading fees associated with purchases and sales.
For long-term investing, this is generally the less expensive option. However, automated execution can fail if the RoboMarkets API temporarily requires more buying power than is available in the account.
Margin Account
A Margin Account provides leverage of up to 1:20. This makes it possible to execute orders that temporarily exceed the cash balance available in the account.
In this study, leverage is not used to increase the portfolio’s long-term market exposure. Instead, it serves as a technical buffer for creating fractional positions through the API.
The disadvantage is the financing cost. RoboMarkets charges approximately 7% per year on the full value of an open Margin Account position, not merely on the amount of margin being used.
Consequently, a Margin Account may solve the technical execution problem while substantially increasing the total cost of portfolio management.
Why the RoboMarkets API Has Problems With Fractional Positions
When trading manually, an investor can purchase the required fractional position directly.
For example, if the desired position is worth $12, the trading fee is charged only on the $12 transaction.
Through the RoboMarkets API, creating the same fractional position may require two transactions:
| Transaction | Number of shares | Transaction value |
|---|---|---|
| Purchase | 1.1 shares | $132 |
| Subsequent sale | 1 share | $120 |
| Final position | 0.1 shares | $12 |
Although the final position is worth only $12, the account temporarily needs enough buying power to purchase 1.1 shares for $132.
The 0.075% trading fee is also charged on both transactions:
$132 × 0.075% + $120 × 0.075% = $0.189
A direct manual purchase of the $12 position would cost:
$12 × 0.075% = $0.009
In this example, creating the fractional position through the API is approximately 21 times more expensive than purchasing it directly.
More importantly, the $132 API order will be rejected on a Cash Account if only $120 is available, even though the required final position is worth just $12.
A Margin Account solves this problem by providing temporary buying power.
The Data-Driven Portfolio Used in the Study
The study is based on a real data-driven portfolio available in StockCharacteristics.
The portfolio holds five technology stocks from the S&P 500 with the largest year-over-year improvement in ROA, or Return on Assets, over the previous 252 trading days.
The strategy does not select companies according to the highest current ROA. It selects those with the largest annual change in this characteristic.
Each stock receives a target weight of 20% of the portfolio.
The portfolio is reviewed monthly. Stocks that are no longer among the five highest-ranked companies are sold and replaced with newly selected stocks.
Strategy Parameters
| Parameter | Value |
|---|---|
| Investment universe | Technology stocks from the S&P 500 |
| Number of stocks | 5 |
| Target weight per stock | 20% |
| Rebalancing frequency | Monthly |
| Typical long-term monthly turnover | Approximately 40% |
| Typical number of stocks replaced | Approximately 2 out of 5 |
| Gross annualized return over the previous 10 years | 30.33% p.a. |
Historical performance is shown before trading fees and financing costs. It is not a guarantee of future performance.
Actual Portfolio Holdings During the Observed Period
We did not calculate the results from a theoretical assumption of 40% monthly turnover alone. We used the portfolio’s actual constituents for every month.
| Portfolio month | Stocks held |
|---|---|
| October 2025 | LRCX, KLAC, AVGO, FICO, VRSN |
| November 2025 | AVGO, FICO, WDC, STX, MU |
| December 2025 | WDC, AAPL, UBER, INTC, AVGO |
| January 2026 | MU, WDC, INTC, UBER, AAPL |
| February 2026 | WDC, AAPL, MU, INTC, UBER |
| March 2026 | PLTR, WDC, STX, KEYS, MU |
| April 2026 | STX, WDC, MU, LITE, PLTR |
| May 2026 | MU, QCOM, WDC, FICO, PLTR |
| June 2026 | TER, WDC, MU, NVDA, QCOM |
| July 2026 | NVDA, WDC, QCOM, TER, MU |
| August 2026 | MU, NVDA, STX, FIS, WDC |
| September 2026 | TER, MU, WDC, STX, PLTR |
The observed year includes the initial construction of the October 2025 portfolio on September 30, 2025, followed by eleven monthly portfolio reviews through the September 2026 portfolio.
Actual Portfolio Turnover
| Rebalancing | New stocks purchased | One-way turnover |
|---|---|---|
| November 2025 | 3 | 60% |
| December 2025 | 3 | 60% |
| January 2026 | 1 | 20% |
| February 2026 | 0 | 0% |
| March 2026 | 3 | 60% |
| April 2026 | 1 | 20% |
| May 2026 | 2 | 40% |
| June 2026 | 2 | 40% |
| July 2026 | 0 | 0% |
| August 2026 | 2 | 40% |
| September 2026 | 2 | 40% |
| Observed-period average | 1.73 stocks | 34.5% |
The strategy’s typical long-term monthly turnover is approximately 40%. During the eleven observed rebalancing periods, the average was 34.5%.
This is equivalent to approximately 4.15 times the portfolio value per year on one side of the transaction.
Because replacing a stock involves both a sale and a purchase, the total traded value was approximately 8.29 times the portfolio value.
RoboMarkets API Calculation Methodology
We tested three initial portfolio sizes. The target value of each position was fixed at 20% of the selected initial capital.
| Initial capital | Target value per position |
|---|---|
| $500 | $100 |
| $5,000 | $1,000 |
| $50,000 | $10,000 |
For the initial portfolio construction and each subsequent rebalancing, we:
- identified the stocks being sold and purchased,
- used their historical closing prices on the relevant rebalancing date,
- calculated the 20% target position,
- determined whether the target position represented less than one full share,
- accounted for the additional purchase and subsequent sale required to create a fractional API position,
- calculated the cash released from the stocks being removed,
- carried any residual cash forward,
- submitted fractional positions first, starting with the least expensive whole share,
- submitted the remaining purchases afterwards,
- calculated trading fees from the full amount actually traded.
The trading fee used in the model is 0.075% for every purchase and sale.
For the Margin Account scenarios, we add financing equal to 7% of the initial portfolio capital for the observed year.
The results include the initial purchase of all five stocks, all eleven subsequent portfolio reviews, and all 24 intended purchase orders.
The calculations do not include bid-ask spreads, currency conversion, price slippage, taxes, or future changes to the broker’s pricing conditions. Current conditions should always be verified on the official RoboMarkets website.
Initial Portfolio Construction Costs
The initial purchase of all five stocks is included in the total costs.
| Initial capital | Manual Cash fee | API fee | Cash API orders executed |
|---|---|---|---|
| $500 | $0.38 | $3.90 | 2 out of 5 |
| $5,000 | $3.75 | $5.99 | 5 out of 5 |
| $50,000 | $37.50 | $37.50 | 5 out of 5 |
The difference is already significant at $500. Although the final portfolio requires only five positions of $100 each, three of the five initial Cash API orders cannot be executed because of the temporary buying power required to create fractional positions.
RoboMarkets API Costs and Execution Results
We consider Cash API execution sufficiently reliable when at least 95% of the intended purchase orders can be completed automatically.
A 95% success rate means that the investor would need to make a manual correction only occasionally. A 100% success rate means no manual intervention was required during the observed year.
| Capital | Trading method | Orders executed | Trading costs | Financing | Total cost | Cost relative to capital |
|---|---|---|---|---|---|---|
| $500 | Cash – manual | 24 of 24 | $3.33 | $0 | $3.33 | 0.67% |
| $500 | Cash – API | 10 of 24 | $15.75* | $0 | $15.75* | 3.15%* |
| $500 | Margin – API | 24 of 24 | $15.75 | $35.00 | $50.75 | 10.15% |
| $5,000 | Cash – manual | 24 of 24 | $33.34 | $0 | $33.34 | 0.67% |
| $5,000 | Cash – API | 24 of 24 | $37.13 | $0 | $37.13 | 0.74% |
| $5,000 | Margin – API | 24 of 24 | $37.13 | $350.00 | $387.13 | 7.74% |
| $50,000 | Cash – manual | 24 of 24 | $333.43 | $0 | $333.43 | 0.67% |
| $50,000 | Cash – API | 24 of 24 | $333.43 | $0 | $333.43 | 0.67% |
| $50,000 | Margin – API | 24 of 24 | $333.43 | $3,500.00 | $3,833.43 | 7.67% |
* For the $500 Cash API scenario, the figure represents the trading fees that would arise if all intended transactions were completed. The 14 orders rejected by the API would have to be completed manually for the portfolio to match the strategy.
RoboMarkets API Results for a $500 Portfolio
With $500 in initial capital, each stock has a target value of only $100.
Many of the selected technology stocks cost more than the entire target allocation. The API must therefore create fractional positions by purchasing an additional whole share and subsequently selling it.
Out of 24 intended purchase orders, including the five initial portfolio orders, only 10 could be executed through the Cash API.
| Result | Value |
|---|---|
| Intended API purchase orders | 24 |
| Successful Cash API orders | 10 |
| Failed Cash API orders | 14 |
| Success rate | 41.7% |
| 95% reliability threshold reached | No |
Stocks associated with rejected orders included FICO, LITE, STX, TER, KEYS, MU, NVDA, PLTR, AAPL, AVGO, and VRSN.
Submitting fractional positions first improves the use of available cash, but it does not solve the problem at this portfolio size.
The Cash API is therefore not practically usable as a semi-automated solution for this particular $500 portfolio. Most rejected orders would still have to be completed manually.
A Margin Account provides enough buying power to execute all orders, but it increases the modeled annual cost to approximately $50.75, or 10.15% of the initial capital.
- $15.75 comes from trading activity.
- $35.00 comes from Margin Account financing.
Manual management on a Cash Account would have cost approximately $3.33, or 0.67% of the portfolio.
RoboMarkets API Results for a $5,000 Portfolio
With $5,000 in initial capital, each target position is worth $1,000.
Most of the stocks in the observed portfolio can be purchased in quantities exceeding one whole share. The special fractional-position mechanism is therefore needed only for exceptionally expensive stocks.
All 24 intended purchase orders, including the five orders required to establish the portfolio, were successfully executed in the Cash API simulation.
| Result | Value |
|---|---|
| Intended API purchase orders | 24 |
| Successful Cash API orders | 24 |
| Failed Cash API orders | 0 |
| Success rate | 100% |
| 95% reliability threshold reached | Yes |
| Manual intervention required | No |
| Important execution rule | Fractional positions submitted first |
The order in which purchases are submitted is important. The rebalancer executes fractional positions first, while the greatest amount of cash is still available, and submits the ordinary purchases afterwards.
Cash API trading costs, including the initial construction of the portfolio, reached approximately $37.13, or 0.74% of initial capital.
Manual execution would have cost approximately $33.34, or 0.67%. The semi-automated Cash API solution was therefore only $3.79 more expensive over the entire observed year than manual order entry.
Using a Margin Account would have increased the total cost to approximately $387.13, or 7.74% of capital, without improving the execution result.
RoboMarkets API Results for a $50,000 Portfolio
With $50,000 in initial capital, each target position is worth $10,000.
This amount was greater than the price of one share of every stock entering the portfolio during the observed period. The purchases therefore did not require the problematic fractional-position mechanism.
| Result | Value |
|---|---|
| Intended API purchase orders | 24 |
| Successful Cash API orders | 24 |
| Failed Cash API orders | 0 |
| Success rate | 100% |
| 95% reliability threshold reached | Yes |
Because no new target position was smaller than one share, Cash API trading costs were identical to the cost of manual order entry.
Both methods would have cost approximately $333.43, or 0.67% of initial capital, including the initial portfolio construction.
A Margin Account offered no execution advantage and would have added $3,500 in financing costs, increasing the total cost to approximately $3,833.43, or 7.67% of capital.
RoboMarkets API Practical Recommendation
The colors rank the three alternatives separately for each portfolio size:
- 🟢 Recommended option
- 🟠 Workable compromise
- 🔴 Unsuitable option
| Capital | Manual Cash Account | Semi-automated Cash API | Semi-automated Margin API | Recommendation |
|---|---|---|---|---|
| $500 | 🟢 $3.33 / 0.67% Inexpensive and feasible |
🔴 $15.75 / 3.15%* Only 10 of 24 orders executed |
🟠 $50.75 / 10.15% Works, but is very expensive |
Manual Cash Account |
| $5,000 | 🟠 $33.34 / 0.67% Inexpensive, but requires regular manual work |
🟢 $37.13 / 0.74% All 24 orders executed |
🔴 $387.13 / 7.74% Works, but margin is unnecessary |
Semi-automated Cash API |
| $50,000 | 🟠 $333.43 / 0.67% Works, but requires regular manual work |
🟢 $333.43 / 0.67% All 24 orders executed |
🔴 $3,833.43 / 7.67% Works, but margin is unnecessary |
Semi-automated Cash API |
* Cash API executed only 10 of the 24 intended purchase orders in the $500 scenario. The other 14 orders would have to be completed manually.
Overall Assessment
At $500, Manual Trading Is the Most Practical Choice
The Cash API completed only 41.7% of the intended purchase orders.
A Margin Account solved the buying-power problem, but the combination of increased trading fees and financing raised the modeled annual cost to 10.15% of the initial capital.
Manual trading on a Cash Account was therefore the most reasonable solution.
From $5,000, the RoboMarkets API Was the Best Overall Option
At both $5,000 and $50,000, the Cash API completed all 24 intended purchase orders during the observed year. No manual intervention and no Margin Account financing were required.
At $5,000, semi-automated execution cost only $3.79 more than manual order entry over the entire period.
At $50,000, Cash API execution and manual trading had exactly the same modeled trading costs.
For a minimal or zero additional cost, the investor receives a substantially more convenient portfolio-management process through StockCharacteristics.
Final Conclusion
For the portfolio studied, the practical threshold for reliable semi-automated RoboMarkets API execution on a Cash Account was $5,000.
- At $500, manual trading on a Cash Account was the most practical solution.
- At $5,000, Cash API execution completed all orders and cost only 0.74% of the initial capital.
- At $50,000, Cash API execution completed all orders and cost the same as manual trading.
- Margin API execution solved the temporary buying-power problem for the smallest portfolio, but its financing costs made it substantially more expensive.
StockCharacteristics helps investors identify portfolio changes and prepare orders for semi-automated execution through a connected RoboMarkets account.
The calculations show what each alternative would have cost during the specific observed period, from the construction of the October 2025 portfolio through the rebalancing for September 2026.
They are based on historical Nasdaq closing prices and the trading-cost assumptions discussed in our previous article, Portfolio Management Costs at RoboMarkets: Cash vs. Margin Accounts.
The results do not include bid-ask spreads, currency conversion, price slippage, taxes, or possible changes to RoboMarkets’ terms and pricing.