Platinum Customer
Joined: 3/31/2006 Posts: 3,207
|
Bruce,
Let me know if the following is possible please.
The equity line for the watchlist starts and 100 and then ((Prior Equity Line Value) + (AVG Net Change of Equity Lines for each Symbol in WatchList)). This means if 5 years ago you did a trade on ABC stock and it was a loss of let say 10% and that was the only trade that you did on this stock through out your backtest period the equity line for the symbol will be at 90 and this will get averaged in through out your test period in the watchlist equity line. Simply put it is worthless. At the very least the Watchlist Equity Line (Strategy Equity Line) should add and subtract the Average % Change of the OPEN trades. This is how I have been told since Blocks 2.0 that the Equity Line was doing. I can't understand why the equity line of the stocks that you don't own anymore is affecting your equity line today.
As you know there is a problem with the Ann Return/Trade so as of now there is nothing in SF so that we can accurately gauge the performance of our portfolio.
So let me know if I can do this so at least I get an idea of the performance and where I have most of my draw downs.
Can we write a code that would plot the % CH of the stocks that their Symbol Equity Line is either Above or Below the days before value. Therefore if the Symbol Equity Line is moving it means you are in the trade and the new code will plot the % ch for that day and if the Symbol equity line is not moving it will plot nothing. So if we say IF Symbol Equity Line is > or < Symbol Equity Line the day before then Plot ROC % today.
Then we will run an Average Custom Index on the new indicator to give us the average % Ch of the Open Trades.
Then we can create a cumulative indicator by adding and subtracting the % changes.
The equity line starts at a 100 and if Today’s average % change is 2% it will read 102 if tomorrow the average % ch is 2% it will read 104.04 (102*2%) +102 and so on.
Please let me know if you have other way of doing this. Or if you see any issues with this.
Many thanks
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
QUOTE (thnkbigr) The equity line for the watchlist starts and 100 and then ((Prior Equity Line Value) + (AVG Net Change of Equity Lines for each Symbol in WatchList)). This means if 5 years ago you did a trade on ABC stock and it was a loss of let say 10% and that was the only trade that you did on this stock through out your backtest period the equity line for the symbol will be at 90 and this will get averaged in through out your test period in the watchlist equity line. Simply put it is worthless.
Your analysis seems to not take into account either what the manual says about the Equity Line calculations or provide any testing to back up your speculation as to how the Equity Line might be calculated. Here's what the StockFinder Manual says about the Equity Line:
"The Symbol Equity Line plot shows how the equity that is traded for the strategy on the symbol changes over time. At the start of the test period it plots at 100 (100% of the equity). If there are no open trades the line moves horizontally.
The only way the equity can change is if there is an open trade. When there is an open trade, the equity line increases or decreases the same percentage as the percentage change in the stock for the period of the open trade. If the stock is up 10% from the open of the trade to the close of the trade, the equity line will go up 10%.
Equity Line is not a portfolio simulation. It does not take into account number of shares bought/sold, scaling in or out of trades or commissions. It is strictly a way to see how the equity changes at different points in the trade test period for that symbol in that BackScan."
I've created a test Layout that can use to experiment with the equity line calculations as well. You should be able to Open the attached Layout directly into a running copy of StockFinder.
QUOTE (thnkbigr) I can't understand why the equity line of the stocks that you don't own anymore is affecting your equity line today.
The reason is that it reduces the Equity available to you that can be used for trading later.
QUOTE (thnkbigr) As you know there is a problem with the Ann Return/Trade so as of now there is nothing in SF so that we can accurately gauge the performance of our portfolio.
I would be interested in your analysis (or anybody elses for that matter) of how a properly functioning Ann Return/Trade could be used to gauge the performance of a portfolio. I'm sure somebody finds it useful, but as I've posted previously, I don't and I can't figure out how anybody else would see it as useful either.
This isn't meant as sarcasm. I am genuinely interested. It might give me some insight into something I hadn't previously considered.
QUOTE (thnkbigr) Can we write a code that would plot the % CH of the stocks that their Symbol Equity Line is either Above or Below the days before value. Therefore if the Symbol Equity Line is moving it means you are in the trade and the new code will plot the % ch for that day and if the Symbol equity line is not moving it will plot nothing. So if we say IF Symbol Equity Line is > or < Symbol Equity Line the day before then Plot ROC % today.
Just add a Rate of Change (Percent) of Indicator as a Child Indicator of the Symbol Equity Line. It won't "plot nothing", but it will Plot zero when the Equity Line isn't changing.
QUOTE (thnkbigr) Then we will run an Average Custom Index on the new indicator to give us the average % Ch of the Open Trades.
Then we can create a cumulative indicator by adding and subtracting the % changes.
The equity line starts at a 100 and if Today’s average % change is 2% it will read 102 if tomorrow the average % ch is 2% it will read 104.04 (102*2%) +102 and so on.
You would want to use a CumulativePercent Block and not a Cumulator Block when constructing something like this.Attachments: Equity Line Demo.sfLayout - 51 KB, downloaded 389 time(s).
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Platinum Customer
Joined: 3/31/2006 Posts: 3,207
|
Your analysis seems to not take into account either what the manual says about the Equity Line calculations or provide any testing to back up your speculation as to how the Equity Line might be calculated. Here's what the StockFinder Manual says about the Equity Line:
Bruce please check with Doug because I have gone back and forth wit him and he said that the Watchlist Equity Line takes into account the Symbol Equity Lines of ALL stocks in the watchlist and it has nothing to do withOpen trades.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Doug's statement that the Symbol Equity Line takes into account the Symbol Equity Lines of ALL Stocks in the Watchlist is absolutely true. That it has "nothing to do with Open trades" would appear to at least be a misinterpretation of what is actually happening. If the Symbol Equity Line of a Watchlist component isn't changing at any given point in time, it isn't changing the Watchlist Equity Line at that point in time either.
You can verify how the Watchlist Equity Line works yourself by playing with the Layout attached to my Tuesday, July 28, 2009 2:36:37 PM ET post.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Platinum Customer
Joined: 3/31/2006 Posts: 3,207
|
This is my emails with him
Doug,
For the watchlist equity line as you said it is using the formula below. What do you mean by the watchlist in the formula below is it All the stocks in the watchlist or the stocks that the system owns from the watchlist you backtesting?
((Prior Equity Line Value) + (AVG Net Change of Equity Lines for each Symbol in WatchList)).
His answer
The WatchList refers to the list that is being scanned. All symbols in the list are included in the calculation.
So what is the difference between Watchlist equity line and Watchlist Buy and Hold equity line?
Isn't watchlist equity line the strategy equity line? Watchlist Buy and Hold equity line includes all symbols not the Watctlist equity line this is only the symbols that are Open trades?
His answer
The Buy And Hold Equity line plots as if you purchased the stock at the beginning and never sold your shares, just a percent change.
Both the WatchList Equity line and the WatchList Buy And Hold line are for all symbols in the WatchList that is scanned. Neither are limited to only open trades.
Doug,
If your watchlist has a 100 stocks but only 20 of those meet your conditions today the Watchlist equity line is only looking at those 20 or the entire watchlist?
His answer
The entire list. The other 80 symbols still have values in their equity lines from prior trades (or a value of 100 if they've had no trades at all).
Doug,
I love SF the things I can do with this is far greater than any other software I've seen but honestly how many of the SF users look at this equity line?
If I am backtesting the last 5 years and ABC stock was traded once 5 years ago and let say it was a losing trade by 3% you mean to tell me that the ABC equity line that sits at 97 now will effect the Watch list equity line five years later? How does this make sense?
Does anyone really use this? Would you please tell me how this makes any sense please?
Maybe I am not understanding him correctly. Maybe both of you are saying the same thing but in a different way that is confusing. It has been 2 years I've been trying to understand the Equity Line and from the posts by other users I don't think anybody undersatnds it.
Can we have Julia and Michael do a webinar on the Equity Lines on one of the Tuesday nights so that everyone can clearly understand how to use them.
Thanks
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Your interpretation of Doug's statements appears to be correct. And Doug's analysis would appear to be correct as well. It doesn't have anything to do with Open trades. In looking at the Watchlist Equity Line more closely, it does appear to simply be an Average of the Symbol Equity Lines of its components.
I cannot figure out a way to construct a Watchlist Equity Line of the type you have outlined in the current version of StockFinder. The Symbol Equity Line is not constructed in such a way that it seems to work as a Custom Index. A Custom Index based on a RealCode Indicator using the Symbol Equity Line as an input seems to be based entirely upon the Active Symbol and to not get any values from the rest of the symbols in the Watchlist.
This oddity may be explained by the construction of the Symbol Equity Line which does not have an Active Symbol in the Watchlist (the BackScan Symbol Equity Line is just a Block that does not require any inputs at all in the Block Diagram). This means I can't figure out a way to use a List Average Block to construct a Block Diagram based version either.
I have spoken with development and have been assured that the issues with the Watchlist Equity Line and Ann Return / Trade will be addressed.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Platinum Customer
Joined: 3/31/2006 Posts: 3,207
|
Thank you
I am in middle of something as soon as I am done I will look at your Layout.
|
|
Registered User Joined: 12/31/2005 Posts: 2,499
|
See Back testing averaging strategy for a similar idea. Just have the computeProfit module assume a single entry, no position averaging. One could also just enter a trade buy and hold and not exit. The plot = profit + gain combined with a fixed starting balance for each symbol would produce an equity line for each symbol. The profit being 0 for a buy and hold and the gain being the profit/loss of the open trade.
A custom index of this indicator would produce an average equity plot of the watchlist. It would be based on a starting equity for each symbol being the same. Note for an index list, for example S&P500, the home brew result would not match the S&P500 for a couple reasons:
1. membership differences
2. the S&P500 index performance would be market value weighted where the home brewed custom index average would be equal weighted.
|
|
Platinum Customer
Joined: 3/31/2006 Posts: 3,207
|
Bruce,
On your Layout we have 2 symbols FX150 and FX300. FX150 gains 150% every 12 months while FX300 gains 300 every 12 months.
You have 2 trades
1st) 1/4/2007 Buy FX300 and Sell on 1/4/2008 12 months later at a profit of 298.4%.
The symbol equity line went from starting value of 100 to 398.40 up 284.4% after the 1st trade. This is accurate.
But the Watchlist Equity line went from starting value of 100 to 249.20 up 149.2% half of what the FX300 gained during that time. This is because you have 2 symbols in the watchlist and the 298.4% gain is getting averaged.
I added a 3rd symbol AAPL just to see what happens. When you update you will still have 2 trades none on AAPL of course.
Now the watchlist equity line is at 199.47 up 99.47% 1/3rd of the 298.4% gain from the FX300 trade which at the time was the only OPEN trade in the system.
The more stocks you add to the watchlist the lower the value of the Watchlist equity line will go. This explains why when I run a simple test on a watchlist of 3000 stocks why the equity line is the toilet meanwhile I have 55% Winning trades and a Gain to Loss ratio of 4 which is amazing but the equity line is being affected by all other stocks that are in the watchlist when you never even traded them.
The Equity Line should only Plot the performance of stocks that are OPEN that day so you can get a gauge of how fast the equity line is rising or falling.
Let me give you another example, Other than performance I like to see my Draw downs in the portfolio.
% of winning/Losing trades, Gain to Loss Ratio and all of that is great but how do you know where most of your losing trades took place so you can be aware of those market conditions. We need to see what the maximum draw down was and when it happened. A strategy that has 50% winning trades and Gain to loss Ratio of 3 sounds great but what if bulk of the losing trades came in the first 6 months of the test period therefore in reality you have a much smaller back account to invest in the 2nd half the test period to take advantage of the winning trades.
I added another 497 symbols to give the watchlist 500 symbols. After you update you still have two trades but the Watchlist equity line after the 1st trade is at 100.62 up 0.62% (298.4% Gain of the FX300 / 475 stocks that were part of the watchlist on 1/4/2007)
In a list of 500 stocks if you own 20 stocks and they Gain an average of 25% this will Gain 0.05 so if they fall by 25% this will fall 0.05. How is this telling you anything about your draw down?
This is worthless. You are better off getting rid of this. I am telling you it will stop getting your users aggravated and more importantly stop wasting their time. Take this out no one will use this and if they do it is because they have no clue what its doing.
I don't mean to be rude, SF is absolutely amazing but how is it possible that after 2 years this is the best way the programmers have been able to put an Equity line together.
If you don't believe me that no one will use this after they know what its doing do a webinar next Tuesday and take a poll.
Get rid of this please.
|
|
Registered User Joined: 12/31/2005 Posts: 2,499
|
QUOTE (thnkbigr)
...
...
As you know there is a problem with the Ann Return/Trade so as of now there is nothing in SF so that we can accurately gauge the performance of our portfolio.
...
...
Portfolio Performance Tracking....
It has been suggested numerous times that provding realcode access to the trade information would do the trick.
Then one can do realcode backscan post processing of the trades "detected" by the backscan. This post process could be run multiple times changing parameters to gain a valuable appreciation of the strategy's potential.
The potential trades could be processed and along with starting equity a portion of the trades could be executed using whatever trade sizing and risk managment approach one desires. Various tie breakers could be researched for those days when too many trades are available.
Given the capable realcode prgramming community I am sure a number of different "money managment modules" would be produced, providng numerous metrics for measuring performance. A key aspect is the development cost of these MM modules to Worden would be zip.
Blue Skying is a bit here.... One can dream!
Other additional capabilites would permit easy preparation of standard performance charts and reports:
1. Providing a realcode template that would permit multiple plot lines would also permit easy plotting the equity, available cash and available margin lines on the chart from a single module.
2. Supporting a "table class" for accesing the trade informatiopn and permiting realcode read access via "userinput.table" and write access, via "useroutput.table", to these tables, along with writing output to csv files would simplify the realcode and provide powerful post processing opportunities. Maybe supporting "userInOut.table" as well.
The combination of these 2 features would be a awesome.
One could also tailor a MM module to permit period deposits or withdrawals and model the resulting performance.
Types of charts and reports easily produced would be:
1. drawdown plots of the trades taken
2. trade distributions charts, of taken and/or untaken trades:
a. by profit%
b. by trade duration
c. by drawdown
d. by exit taken
e. etc. etc.
3. benchmark comparisons
4. Calendar based preformance plots and reports
a. Yearly
b Quarterly
c. Monthley
4. correlation studies of profit% to "at entry" indicator values
Note it would be great if this money management module interface is designed so that multiple MM modules could be associated with a backscan and automatically run after the backscan.
End of Blue Skying......
|
|
Registered User Joined: 4/17/2007 Posts: 39
|
Bruce, you indicate:
"I have spoken with development and have been assured that the issues with the Watchlist Equity Line and Ann Return / Trade will be addressed."
This is great news! Any idea of the timeframe for when this might be done (days/weeks/months/years)?
I ask this since I'm using an Excel work-around to externally calculate return and equity lines and am currently working on further improving the (Excel) code, so it would be nice to know how much effort to expand on this before the Worden calculations are improved. Thanks.
-Zig
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
thnkbigr,
I had misintepreted the results of my initial tests when I made my initial post and was disappointed to find out that my interpretation was completely wrong and that your interpretation of Doug's remarks and Doug's interpretation of the algorithm used was correct.
jas0501,
While I know that BackScanner is going to get some attention, I do not really have any information beyond this about what changes might be made to address the current issues and limitations or even the extent of the changes that might be made (bug fixes versus overhaul). These decisions have probably not yet been made.
zig208,
I do not know what the timeframe will be. I have seen quite a few new internal builds recently (and I only get occasional snapshots of what's actually happening in development). Testing just the changes so far would seem to make a new release in a matter of days unlikely. Thinking in terms of years would seem out of line with the assurances I have received about BackScanner getting attention.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 12/15/2008 Posts: 17
|
Pls consider this another vote to enhance or fix the backscanner. I've had extensive experience with other softwares that have robust portfolio management capabilities, of which SF is lacking at this point.
The power that SF has.. and the fact that it can go back so many years of price and fundamental data is a "huge" advantage, IMO. It's a shame that they do not take more advantage of this by enhancing the backscanner/portfolio management capabilities.
Searching for stocks , using indicators and painting pretty color bars on the charts is fun.. but it will not create a strategy that produces an edge. To do so, you need a robust portfolio manageent/backtesting capability. SF clearly has the technology to accomplish this.
hopefully the management team recoginizes this and puts it as a top priority.
|
|
Registered User Joined: 12/31/2005 Posts: 2,499
|
QUOTE (Bruce_L) thnkbigr,
I had misintepreted the results of my initial tests when I made my initial post and was disappointed to find out that my interpretation was completely wrong and that your interpretation of Doug's remarks and Doug's interpretation of the algorithm used was correct.
jas0501,
While I know that BackScanner is going to get some attention, I do not really have any information beyond this about what changes might be made to address the current issues and limitations or even the extent of the changes that might be made (bug fixes versus overhaul). These decisions have probably not yet been made.
zig208,
I do not know what the timeframe will be. I have seen quite a few new internal builds recently (and I only get occasional snapshots of what's actually happening in development). Testing just the changes so far would seem to make a new release in a matter of days unlikely. Thinking in terms of years would seem out of line with the assurances I have received about BackScanner getting attention.
Thanks Brice for the reply. I appreciate your position, bewteen the customer and the development team, or between a rock and a hard place. I commend you on you expertise in handling the wide ranges of issues and emotions expressed by the user community, myself included.
There are a lot of passionate users chomping at the bit for the next quantum step for StockFinder. I feel sometimes that StockFinder is a 7 foot tall basketball player that hasn't yet learned how to dunk! The potential is unreal and it is frustrating waiting for the skill set to evolve, in addition to not knowing if there is any coaching going on!
As to my suggestion permitting realcode access to the trade information is key, upon reflection it is not so simple an issue as my post indicates. I am in the process of drafting a suggestion for a Money Management Template model that would provide for realcode coding of a flexible and robust protfolio managment interface. I'm hoping it will spark some discussion and provide seom food for thought for the development team and the user community.
Again thanks for the response and attention to this issue as well as many others. You do a great job under not so easy conditions.
|
|
Platinum Customer
Joined: 3/31/2006 Posts: 3,207
|
Bruce, What was the Code for the equity line in 2.0? I know for fact that it was not averaging in all the stocks in the watchlist.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
If I recall correctly, it rebalanced your portfolio as stocks were bought, sold and changed in value so your total equity was evenly distributed between all of your investments. I haven't done the math to make sure, but I think this is the same as averaging the percent changes of your open positions and applying them to the total equity (and I think we verified this experimentally be creating our own fake Equity Line in Blocks 2.0 for a simple Strategy and small Watchlist). If so, the program probably did the latter internally as that would be a far simpler algorithm.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |