Hi,
I have been a satisfied user for about 15 years but I still haven't gotten to the bottom of a problem;
The management of purchases when you exceed your available capital because it seems that the software considers available money from profit positions not yet closed "Portfolio_OpenPositionProfit"
Let me explain with a practical example:
In portfolio trader setting like the attached "MC" with the Signals "prova":
{********************************************************************************}
if C>0 THEN buy (InitialCapital +Portfolio_NetProfit)/c shares next bar at o;
IF LASTBARONCHART THEN SELL THIS BAR AT C;
{********************************************************************************}
I start with an Initialcapital of 100.000 usd and then:
The oldest symbol AMD is bought in date 19/03/1980 (32989 shares * 3,03=99.956) and sold in date 11 09 2023 and up to here everything is correct. But In date 07 06 1993, the first day of data avilable for the latest symbol ALL, this is bought for 14192 shares at 6,95= 98.687. How is this possible, since all the money was used in the first purchase AMD?
See the attached file "list of Trade"
This happen because the backtester see the money from the Portfolio_OpenPositionProfit available. But this is a mistake because the money is not available until the transaction is closed and the simulation ends up with more invested assets than it could in reality.
I am the one who set up the portfolio trader incorrectly?
Thanks in advance for the help!
Riccardo
Portfolio Trader
Portfolio Trader
- Attachments
-
- List of Trade.png
- List of trade
- (25.44 KiB) Not downloaded yet
-
- MC.png
- Portfolio Trader Setting
- (71.04 KiB) Not downloaded yet
- Kate MultiCharts
- Posts: 597
- Joined: 21 Oct 2020
- Has thanked: 9 times
- Been thanked: 148 times
Re: Portfolio Trader
Hi Riccardo!
It’d depend on how the price had been changing since 1980 to 1993.
Capital is not spent on entries, but a part of it gets reserved while a position is active.
The red line is Buying Power, which depends on market prices. Strategy buys using all the available capital and holds. But the market grows, and so does the buying power.
Most likely, in your case, the red line allowed purchasing 14192 ALL contracts in 1993.
The part reserved for the active position = constant = the difference between Equity and and the Buying Power red line = capital invested upon the position opening at the Open price.
Here’s a screenshot for reference.
It’d depend on how the price had been changing since 1980 to 1993.
Capital is not spent on entries, but a part of it gets reserved while a position is active.
The red line is Buying Power, which depends on market prices. Strategy buys using all the available capital and holds. But the market grows, and so does the buying power.
Most likely, in your case, the red line allowed purchasing 14192 ALL contracts in 1993.
The part reserved for the active position = constant = the difference between Equity and and the Buying Power red line = capital invested upon the position opening at the Open price.
Here’s a screenshot for reference.