[ARCHIVE] MS123 Performance Visualizers library and MS123 Scorecard
Author: Eugene
Creation Date: 12/8/2008 8:35 AM
profile picture

Eugene

#1
Community.Visualizers are updated the to v2008.12. Update using the Extension Manager tool.

What's new:
* Added new visualizer: Performance Extras
* Added moving average of drawdown to the Drawdown (%) performance visualizer
* Added linear/log scale selection to Strategy Equity + Drawdown % and Closed Equity charts. Those who are interested can find out more about the difference HERE.

As always, complete project source files are available in WL5 Wiki.
profile picture

Eugene

#2
New update to Community.Visualizers makes possible the type of analysis known by seasoned WL users as Analysis Series View.

Description and tutorial to follow shortly.

In addition, a couple of new performance metrics specifically to those who care about reward/risk and outlier trades.

As usual, updating is possible using WL5 Wiki or directly in Extension Manager.
profile picture

Eugene

#3
profile picture

benito747

#4
To use the Community Visualizers do you simply copy the Community.Visualizers.dll to the Wealth-Lab Pro 5 directory?

Should this capability then show up on the analysis screen?

profile picture

Eugene

#5
Actually, no direct copying required. If you don't have Community.Visualizers installed, please follow the link in the first message to download and install it using the convenient Extension Manager.

After restarting Wealth-Lab, the new visualizers will appear in the Preferences dialog where you'll need to enable the one(s) you want to use. (See Preferences > Performance Visualizers in the User Guide for more.)
profile picture

sgubba

#6
I tried to update within WL 5.3. Application is not recognizing the updated status yet.
profile picture

benito747

#7
Followed instructions and installed properly. Went to preferences and noticed that there are various performance metrics that can be individually selected this is what I missed. Seems like all is working. I also noticed that I needed to first run in the "Strategy Window" to actually see these new metrics.

Thanks.

profile picture

Eugene

#8
QUOTE:
I tried to update within WL 5.3. Application is not recognizing the updated status yet.

sgubba, are you looking for it on the "Other Extensions" tab? Otherwise I'm not sure I was able to understand your problem.
profile picture

Eugene

#9
In 2009.03 update:

Added: Unzoom by double-clicking the chart (applies to all Zoom-enabled visualizers).
Added new visualizer: Closed Equity Drawdown (%)
Added new performance metrics to Performance Extras: Closed trade drawdown
profile picture

Eugene

#10
The latest update 2009.05 bring 2 more new, never before seen visualizers:

Win Rate + Win/Loss Ratio chart
Trade Stability chart

As well as contains some internal optimizations to curve drawing performance and faster collections.

Finally, fixes two bugs: a pesky bug in Analysis Series that sometimes produced an exception dialog, and a bug with unzooming the "Strategy Equity + Drawdown" chart.
profile picture

BigE

#11
Eugene,

It would be nice to have optimal f included in the performance metrics. It is a very simple calculation.

f = [p(R+1)-1]/R
where R = profit to loss ratio
p = chance of a winning trade

For a sufficiently large number of trades p = %winners/100 and R = the payoff ratio. I do not use this formula to determine position size but it is another metric I use to evaluate the performance of a trading system. I prefer to have an opt f > 0.4.
profile picture

Eugene

#12
BigE,

Thanks for your suggestion but let me argue.

1. The typical usage of a performance visualizer is to visualize a trading system's performance. What does it have to do with a formula that estimates the optimal amount to risk in any given trade?
2. The optimal f by Vince as we know it should include the biggest loss, but the formula above does not.
profile picture

Eugene

#13
Here comes the build 2009.07 that has some noteworthy changes:

1. By Fidelity request, Analysis Series was removed and re-released as a new Visualizer in a new Library. You need to download WealthLab.Visualizers.Extra if you want to continue using Analysis Series.

2. Added: Several reward/risk ratios to Performance Extras: APD & APAD Ratio (requested by swuzy), MAR Ratio, K-Ratio

3. Fixed:

* Strategy Equity + Drawdown%, Net Profit+ Drawdown%: now work with symbol rotation strategies in Portfolio Simulation mode (requested by ss161)
* Performance Extras: closed equity drawdown, avg.commission wrong for all but "All Trades"
profile picture

Cone

#14
Thanks for all the great updates Eugene.

The plan as of now is add Monte Carlo-Lab to "Extra" package for a December release ... subject to change and market conditions ;)
profile picture

dansmo

#15
Enhancement Request:

For system development I like to show the "Life" of trades, meaning bar-by-bar returns of single trades shown as line graph. Including a tab for this would be really great. Separating by All Trades/Winning Trades only/Losing Trades only would be great.

Here´s an example picture how I do this in excel:

profile picture

Cone

#16
It's artistic (to some like Miró), but how do you use these results? To me, the image hardly provides more information than Avg Profit or Avg Bars in Trade.

By the way, Community.Visualizers is Open Source. It would be great for some users to program your own custom Visualizer and add the source to the project yourself!
profile picture

Eugene

#17
Interesting suggestion and outlook, thanks.

* To my taste, the chart gets messy after only a several dozen trades. Is that acceptable that with several thousand trades, there would be a big monochrome filled area?
* What are the interpretation guidelines? Any external link?

Feel free to add.
profile picture

dansmo

#18
Cone: if I could program it, I probably would do it.

Indeed, the above picture is not the perfect example, beacuse there are so many trades in this period.
With this analysis one can see at a glance how trades behave until they are closed. One could also add a feature to show the life of an average trade. Thomas Stridsman works with these graphs in his book "Trading Systems that work". See figure 10.2 on page 178 or figure 9.7 and 9.8 on page 151.
profile picture

Eugene

#19
QUOTE:
beacuse there are so many trades in this period.

How many (or in what ballpark?)
QUOTE:
See figure 10.2 on page 178 or figure 9.7 and 9.8 on page 151.

Good, thanks.
profile picture

dansmo

#20
it is about 250 trades on 5 minute data.

For example, you can analyse:
- where to place stops
- where to place profit target
- where to exit trades after a maximum numbers of bars etc.

profile picture

Eugene

#21
dansmo,

Your idea has been implemented in a visualizer: look for the "Trade Life" next month when our visualizer pack is updated. Separating by All/Winning/Losing trades, of course, wasn't forgotten.

It's nice to see how the Visualizers library is driven by our community.
profile picture

dansmo

#22
Thank you. I am really looking forward to it.
profile picture

Eugene

#23
Annoucing the availability of Community.Visualizers 2009.09.

Especially loved creating this build as it shows the power of community-driven development model. Most of the new stuff -- such as Community.Scorecard, "Trade Life" and some performance metrics -- was requested by our customers, and Wealth-Lab listened. Here's a quick summary of changes:

Added:
* New visualizer - "Trade Life"
* New library - "Community Scorecard": a collection of performance metrics requested by the Wealth-Lab community to be used in Strategy Ranking and Optimization. Includes: Ulcer Performance Index, MEGAN Ratio, Max Drawdown of closed equity, Performance Ratio, Select Net Profit, APD/APAD ratios, Lake Ratio, K-Ratio, MAR Ratio and Trade Efficiency
* Trades V2 - "Entry/Exit/Total Trade Efficiency"
* Changed: Dropped support for Wealth-Lab versions less than 5.4. The library will only work with Version 5.4 and higher

Another new visualizer -- "Portfolio Inspector" -- will be made available only to registered Wealth-Lab Developer 5 customers (create a support ticket). This is just the beginning of the trend: we have some cool stuff in the works that will only become available to customers.
profile picture

dansmo

#24
Great, thank you Eugene.
profile picture

Ray60

#25
Eugene,

I just used the Extension Manager to install the "community Performance Visualizers Pack 2009.09.15".

I went to the strategy optimizer, Clicked on the results tab, Selected Community Scorecard, Clicked on the Optimizer Control tab, Selected Monte Carlo Method, Clicked on Settings. The Metric to optimize list included:

Max Drawdown(Closed)
Avg Entry/Exit/Total Efficiency
Performance Ratio
Select Net Profit
APD/APAD ratio
Lake Ratio

I cannot find the Ulcer Performance Index in the Optimizer.

I do see the UPI at the bottom of the Backtest Performance Report on the Performance Extra tab.

How can I get the optimizer to work on the Ulcer Performance Index?

Thanks.
profile picture

Cone

#26
The report will update for the selected Scorecard when you run the Optimization.
profile picture

Ray60

#27
Robert,

QUOTE:
I went to the strategy optimizer, Clicked on the results tab, Selected Community Scorecard,


That is what I did but the UPI is not there. Please try it and let me know if you have the UPI on either the Settings dropdown list or the Results Grid.

Thanks.
profile picture

Eugene

#28
Ulcer Performance Index can be calculated only in Portfolio Simulation mode. This is documented in on the Community.Scorecard page. Like Sharpe ratio, its cousin, it makes zero sense in Raw Profit mode and can't be calculated. So, just switch to Portfolio Simulation mode.
profile picture

Ray60

#29
I switched to Portfolio Simulation mode and it worked.

Thanks.
profile picture

dankimel

#30
I've downloaded the Community.Visualizers and added Analysis Series in my Preferences.

However, when I back test a script and choose the Analysis Series tab, I seem to get the right graphic template, but nothing shows up on it. When I try to select a DataSeries, none are available.
profile picture

Eugene

#31
QUOTE:
When I try to select a DataSeries, none are available.

See Wealth-Lab 5 Wiki > Analysis Series View > "Can't find data series on the list?"
profile picture

Eugene

#32
Community.Visualizers 2009.10 released.

* Added: New Visualizer: "Risk/Reward ratio"
* Added: Performance Extras: Risk/reward ratio (average, standard deviation etc.)
* Added: Community Scorecard: Average risk/reward ratio (for total, winning and losing trades)
profile picture

dankimel

#33
Community.Visualizers are now working great. Quite helpful.

Thanks.
profile picture

akardar1

#34
Great work on some new risk/reward metrics. This is very handy.

Question: I have downloaded the community visualizer extension,
and chosen the ones I find useful via the preference box, but
I dont see the 1)Analysis Series and 2) Portfolio Inspector.
I am using portfolio mode. What am I doing wrong ?
profile picture

Cone

#35
Analysis Series was separated into its own extension called "Extra Performance Visualizers". See the Add-in section.

Portfolio Inspector hasn't been released.
profile picture

Eugene

#36
As a Developer 5 customer, you can contact our support and request the Inspector extension, though.
profile picture

avishn

#37
Exit efficiency in Trades V2 (Community Visualizers)... Is this right?


Exit efficiency is 4.30%?

profile picture

avishn

#38
Regarding "Trade Life"... I find it very useful. Thanks!
Would it be possible to add average and 1 & 2 standard deviations to the chart? Also it would be nice to be able to filter trade life lines by symbol (in case of multi-symbol strategy).
profile picture

Eugene

#39
QUOTE:
Exit efficiency is 4.30%?

Presumably no. Thank you for the heads-up. Will be looking into it tomorrow.
QUOTE:
Would it be possible to add average and 1 & 2 standard deviations to the chart?

Can't promise, but I'll find out if it's feasible and let you know.
QUOTE:
Also it would be nice to be able to filter trade life lines by symbol (in case of multi-symbol strategy).

Sorry. Considering the design of the visualizer, that would take a complete rewrite.
profile picture

Eugene

#40
Re: Efficiency

The bug is harder to fix than I expected, and after having tried multiple approaches to code it through the last couple of days, I was unable to match the Reports-Lab 2 numbers, so I decided to entirely remove all Efficiency calculations from Community.Visualizers. Can't dedicate no more time to it, and can't leave it broken at the same time, so an upcoming build will wash them away. Sorry.
profile picture

avishn

#41
This is what I'm seeing in the PVTrades2.cs (hope I'm looking in the right place) --

CODE:
Please log in to see this code.


Is the problem related to translation of MFE/MAE to start drawdown/end drawdown of the position? And if yes, would it be possible to calculate them by iterating over the bars within position as "entry-min(low)" and "max(high)-exit" (normalized to high-low of course)? I don't know what is Report Lab and not sure if it would match its calculation, but I believe this approach should provide results matching that old Thomas Stridsman's book on trading strategies where I believe STD and ETD concepts originate... I can try to fix it and then submit a patch maybe? Please let me know.
profile picture

Eugene

#42
Reports-Lab 2 for Wealth-Lab Developer 4 is the only tool of our toolbox that made some use of Trade Efficiency.

You hit the nail on the head. And yes, that's what I was doing -- drop p.MFE & p.MAE, and iterate over the bars to get the max/min price of the position. But this alone was not enough to match RL2 numbers which I believe to be correct.

Your help in fixing will be much appreciated. Currently I can't devote any time to fixing these numbers, because it's already stepping in my plans to create a never-before-seen library for WL 5.6.

A couple of notes:

1) To get the highest/lowest price in a trade, the following construct will be helpful when iterating over the bars:
CODE:
Please log in to see this code.

2) You would also need to account for the fact that it's not possible to determine if price hit the high or low after a trade entry on the same bar for stop/limit entries, so the close of the bar should be used here.
profile picture

avishn

#43
I'm wondering if simple
CODE:
Please log in to see this code.

would do... Obviously need to adjust for open positions, apply the logic for open/close on the same bar and also I'm not sure if entry and exit bars need to be excluded.

As a side note, I've just realized that it is not the same as STD/ETD from Stridsman's book... Efficiency indicates the difference between entry and the highest (or exit and the lowest), so the bigger the difference the better. On the other hand STD shows the difference between entry and the lowest (the smaller the better). ETD shows if price moved higher before the exit (and then you've lost some of the profit because exited too late), so again the smaller the better. Not sure if interpretation in terms of adjusting entries and exits is the same.

profile picture

avishn

#44
There seem to be no clear description of the entry/exit efficiency indicators as they appear in the RINA software in terms of entry and exit bars. At least my Google search didn't return anything except from the article by Leo Zamansky mentioned on WL wiki and some other brief references to the technique. I guess we need to assume that the entry bar is included if entry was on open (market) and excluded if entry happened on close. For stop/limit buys we probably still need to include entry bar to be on the safe side, though I'm not sure about that. I assume WL's current implementation of HighestHighAsOfBar and LowestLowAsOfBar takes care of that.

For exit bar the logic is probably the reverse (almost) of that for entry -- i.e. we exclude exit bar when exiting on market and include when exiting on close, stop or limit.

If this looks fine to you I will put the logic together in C# and submit it later next week.
profile picture

Eugene

#45
I'm not familiar with these concepts by Stridsman, but Zamansky of RINA software was the man behind Efficiency, so the downloadable PDF article is the key source of information.

Entry and exit bars should be included in the calculation, and I agree with your logic of handling them differently based on the order type (mkt vs. cls/stp/lmt orders). For stops/limits, please account for #2 in my reply from 10/16/2009 1:28 PM.

Thank you.
profile picture

Eugene

#46
Re: add average and 1 & 2 standard deviations to the chart ("Trade Life")

I just finished reviewing the code and found the change to be too demanding, considering the current design's limitations. It did not account for having more than 1 collection of plotted items at a time, or showing/hiding these extra curves. Sorry, but neither one of your 2 good ideas is feasible w/o having to rewrite a great portion of internals.
profile picture

avishn

#47
Re: #2
Do position's HighestHigh and LowestLow methods already account for the stop/limit entry and the uncertainty around hitting/not hitting low/high on that bar? Unfortunately, it is not reflected in the WL reference documentation. If the answer is yes, then I don't think I need to make any additional adjustments... If no, then I need to ditch both altogether and come up with my own looping to find the highest and the lowest of the position.
profile picture

Eugene

#48
No, I don't think that these methods account for the stop/limit entry.
profile picture

avishn

#49
Here's the code.

For highest highs it ignores entry's bar high if entering with any order type other than "market". Initial highest value is set to max(close, entry price) in that case.

For lowest lows it ignores entry's bar low if entering with any type other than "market". Initial lowest is set to min(close, entry price).

Then it is a simple loop to find the highest high (lowest low).

For exit it takes high (low) of the last bar if exiting at close or the position is still open, otherwise it takes max(exit, open) (or min(exit, open) for lows) of the last bar.

CODE:
Please log in to see this code.


CODE:
Please log in to see this code.


This code snippet was created and tested as part of a simple strategy script. Please let me know if you'd prefer me to merge it to PVTrades2.cs and PerformanceEngine.cs and forward them to you or if you need a diff file for those.
profile picture

Eugene

#50
Perfect! Thank you Andrew, your help is sincerely appreciated.
profile picture

Eugene

#51
Just updated Community.Visualizers to 2009.11:

* Fixed: Andrew (avishn) found and fixed a bug in all Trade Efficiency calculations. Thank you for the excellent contribution!
* Fixed: optimized the ListViewSortManager class to use Generics instead of ArrayLists in hope of better speed, lower memory consumption
* Changed: possible to install in Wealth-Lab 5.5 or higher

Important!

* Changed: for unification with WL5, the names of two visualizers were changed: "Trades V2" became "Trades+", "Performance Extras" - "Performance+". Please re-select them in Preferences - Performance visualizers!
profile picture

avishn

#52
The new Risk/Reward visualizer doesn't seem to return any results.

A simple Execute() stub w/ 2 trades, shows no data on R/R charts.

CODE:
Please log in to see this code.
profile picture

Eugene

#53
That's right. How will it calculate risk/reward if it has no idea of what was risked in the trade?

To quote the Risk/Reward Ratio visualizer's description page:
QUOTE:
Risk/reward ratio is calculated for trades that have a correctly defined RiskStopLevel only.


Look up RiskStopLevel in the QuickRef.
profile picture

avishn

#54
I apologize, I guess I should start paying more attention to TFM.

The thing that confused me was that neither Sharpe/Sortino ratio nor coefficient of variation are nowhere to be seen in the performance visualizers. I've assumed (erroneously, obviously) that R/R was somehow related to that. So on a semi-related note... Are there any plans to implement either of them as part of the visualizer pack?
profile picture

Eugene

#55
Sharpe ratio is a part of Wealth-Lab's built-in visualizers, Performance and By Period. Naturally, portfolio simulation mode is required to display it (n/a in raw profit mode). Performance+ (and Community.Scorecard => i.e. Optimizer/Ranking) also has a Sharpe ratio alternative: Ulcer Performance Index. I'll mark Sortino ratio to include later - should be possible.
profile picture

dan_rozenberg

#56
Is there any way to mix optimization results from 2 (or more) scorecards? I want to use the number of trades (from Basic) as well as the Megan ratio (from Community) running the optimization just once... How can i do this?

Also, how does Select Profit differ from Net Profit?

Thanks!
profile picture

Eugene

#57
QUOTE:
Is there any way to mix optimization results from 2 (or more) scorecards?

Only by coding the metric missing in one scorecard in another scorecard [using Visual Studio or SharpDevelop]. I'll update the Community Scorecard with the number of trades in the upcoming release.
QUOTE:
Also, how does Select Profit differ from Net Profit?

Explained in the visualizer's online help, please take a look. In addition, clicking on "Select net profit" or any other performance metric shows its brief description.
profile picture

dan_rozenberg

#58
Alright, thanks!
profile picture

Eugene

#59
Community.Visualizers 2009.12 is available for download. In this build:

* Added: RiskStopLevel (+AutoProfitLevel) to be also exported to clipboard and to file in Trades+. Requested by Adrien (akardar1).
* Added: Number of trades to Community.Scorecard (requested by dan_rozenberg).
* Added: Sortino ratio to Community.Scorecard and Performance+ (requested by Andrew (avishn)).
* Fixed: Bugs in risk/reward and APD/APAD ratios calculation for futures. Affected Performance+, Risk/Reward and Community.Scorecard. Thanks to Adrien (akardar1) for pointing out and suggesting a fix.

2 avishn:

Sortino ratio is coded using this legacy PerfScript: PerfScript with some more perf indicators. Internally, the Sample method of standard deviation calculation is used.
profile picture

avishn

#60
Thank you!
profile picture

dan_rozenberg

#61
Is there any way to select a certain Scorecard as the default Scorecard? WL seems to reset it each time the application is closed...
profile picture

Eugene

#62
No.
profile picture

Eugene

#63
Happy New Year! In this year's first update, 2010.01:

* Added: Trade numbers in Trades+. Requested by Bryce (bgood).
* Added: Jump to Position when user double-clicks any graph of the WinRate/WinLoss tab. Requested by Bryce (bgood).
* Added: Max drawdown % to Community.Scorecard.
* Changed: possible to install in Wealth-Lab 5.6 or higher.
profile picture

icolville@colvillenet.com

#64
Hi. Is Sharpe Ratio available in any of the Scorecards? I can't find it. I see that Sortino ratio was recently added (great) but Sharpe would also be very helpful. I know Sharpe ratio is available for an individual set of parameters on the "Performance" tab but this doesn't allow me to see Sharpe ratio for a number of different parameters when conducting optimization. Thanks!
profile picture

Eugene

#65
Sharpe ratio is not currently available in any of the Scorecards.

I'll need to see if it's possible to add to the Community.Scorecard.
profile picture

icolville@colvillenet.com

#66
Since Sortino ratio is already available, I assume there isn't a technical hurdle. Hopefully your development team can fit this in. Thank you in advance!
profile picture

Eugene

#67
OK no problem adding Sharpe to Community.Scorecard, but - like Sortino ratio - it will be based on monthly returns (complete months only). So the number will a bit differ from the one returned by WL5.
profile picture

Eugene

#68
Here we go. Release 2010.02 highlights:

* Added: Wealth-Lab Score to Community.Scorecard. Requested by Dave Aronow.
* Added: some metrics from Basic Scorecard to Community.Scorecard for convenience: NetProfit, Profit per Bar / APR %, Winning %, Avg Profit %, Avg Bars Held.
* Added: Sharpe ratio to Community.Scorecard. Requested by icolville@colvillenet.com.
* Added: New Highs/Lows performance metrics to Performance+: percentage of bars on which a new equity high is made, longest drawdown duration.
* Added: every Visualizer has an online help link in its context menu (right click - "More info..")
* Added: Trade Stability now highlights outlier trades with different color (dark green/red)
* Changed: Trade Stability color scheme, removed 3D look
* Fixed: Sortino ratio accounts for the user-specified risk-free rate.
* Fixed: internal cosmetic fixes to Trade Stability.
profile picture

Eugene

#69
Note: Sharpe ratio and Sortino ratio use monthly returns (complete months only). For this reason, the numbers will slightly differ from those reported by Wealth-Lab 5's "Performance" tab.
profile picture

DaveAronow

#70
Eugene is there any way to re-order the columns after using the community scorecard in an optimization? I tried dragging/dropping them to new locations but that doesn't work. I assume this change would need to apply to every scorecard and is a WL change not a community scorecard change.
profile picture

Eugene

#71
Nope, that's not an option with the ScoreCards.
profile picture

Eugene

#72
Community Performance Visualizers Pack: v.2010.02.10

2/10/2010 Fixed: Sortino ratio was mistakenly calculated using negative returns (should be: total monthly returns).

Fix applies to both Performance+ and Community.Scorecard since they share the same code base.

Thanks to Philippe (phuber) for spotting this!
profile picture

DaveAronow

#73
Would it be possible to have the Analysis Series visualizer toggle to dollar amounts from percentages? When backtesting on futures the percentage changes are often useless, especially when the prices go negative.
profile picture

Eugene

#74
Dave,

Re: futures, maybe it would make better sense to switch the adjustment methodology? For example, ratio- and percentage-adjusted data can't go negative.
profile picture

DaveAronow

#75
The problem then becomes that the dollar amounts are incorrect. A 1% move in sugar is vastly different than a 1% move in oil in dollar terms because of the different leverage. So in terms of evaluating actual profits from a futures system percentage moves are not useful to me.

Even if the prices do not go negative the percentage moves will be off the charts. Would it be easier to just clone that visualizer and use dollars (have one for percentages and another for dollar amounts)?

Dave
profile picture

Eugene

#76
On the technical side of things, creating another dropdown list for %/$ should not bring very much headache... I'll take a closer look after finishing with an ongoing project.
profile picture

Eugene

#77
Two updates in today's 2010.02.12 release:

* Added: Payoff ratio - the absolute value (WL5 shows percentage-based Payoff ratio). Requested by acrjr.
* Fixed: Win Rate + Win/Loss ratio renamed to Win Rate + Profit Factor. The lower chart have always plotted rolling Profit Factor, so it was a typo. :)
profile picture

icolville@colvillenet.com

#78
THANK YOU for adding Sharpe Ratio! Out of curiosity, why only on monthly returns? Sharpe Ratio can be calculated over any period (daily, weekly etc).
profile picture

Eugene

#79
Because the old source code available to me for translation was for monthly returns.
profile picture

Eugene

#80
New monthly update 2010.03:

* Added: Cash curve to Strategy Equity + % Drawdown. Requested by wl64bit.
* Added: Payoff ratio based on absolute values (WL5 shows percentage-based Payoff ratio) to Performance+. Requested by acrjr.
profile picture

avishn

#81
Eugene, could you please make the latest Visualizer pack source code available? It seems that the one available on wiki is pretty old (2009.10?). Thank you.
profile picture

Eugene

#82
Unfortunately, the answer is no. Sorry.

Around that time (2009.10), quite a bit of sensitive code had been included in the project by private requests. Hence, the solution contains heaps of conditional compilation directives. Supporting several versions of the same solution (as open/closed source) became unpractical.

Also, the project since then is a demo - it contains examples of creating every sort of report one can build: a Performance Report, a Table, a visualizer that does Graphs, plus a WealthLab Scorecard.
profile picture

avishn

#83
That's a little bit disappointing... By making it closed source I guess you are also indicating that you are not interested in third party patches and additions to the library (I don't know if you were getting any). I was able to answer my immediate question (ZedGraph styling) by using some other source code examples, so this is not a big deal for now, but the decision to close the source code does seem to be somewhat shortsighted.



profile picture

Eugene

#84
Since its inception, I had only 2 code commits to Community.Visualizers made by the community:

1. your Trade Efficiency fix (thanks), and
2. a Sortino ratio variation (I haven't decided yet whether it's going to be included and in what form).

Considering how many conditional compilation directives does the actual code have to hide sensitive stuff that is not contained in published version, going closed source is the price to pay to avoid the pain of supporting two different code bases of this project which source is about 500Kb in size.
profile picture

inrodwetrust

#85
Hi

1) I get different "Exit Efficiency" values between Trades+ & in Trades V2 (Community Visualizers).

Was the Trades V2 meant to include avishn's above fix?

Because

http://www2.wealth-lab.com/WL5Wiki/GetFile.aspx?File=Community.Visualizers/fsrc_Community.Visualizers.zip

doesn't seem to have it.


2) And is it possible to add indicator values(@ buy date) in the trades list?
Or is the only to do it is to invoke the Strategy Class?


3) And finally while your looking at the PVTrades2.cs in GenerateOutput() - note a tab is missing in the line between "MFE %" & "Entry Efficiency %" ! :-)

CODE:
Please log in to see this code.



Regards
profile picture

Eugene

#86
1 - Why do you think they should be similar? The Trades V2 tab shows a composite value while the Trades+ tab shows the efficiency values for individual trades. I think it explains what you're seeing, because there must be a single procedure in PerformanceEngine.cs that provides Efficiency to any class that requests it. It's a general design rule here.

Of course, avishn's fix is already in as you can see by a change log note several posts above.

2 - It's possible to add them to a Position's entry/exit signal name properties and thus make them show in respective columns. This will work with both the Trades list and the Trades+ tab.

Another option is to add a custom column to the Trades+ tab. In this case, as one of the possibilities, you could save an indicator reading in a Position's Tag property, and use the new column to read it back. I already posted a "walkthrough" of adding a custom column to the Trades+ once:

Write to Trades Performance Visualizer

3 - The source code for Community.Visualizers is a demo, version 2009.10. Several posts up this thread you'll find the reason why. It's not actual, and this little bug was already corrected and you won't find it in release version.
profile picture

inrodwetrust

#87
1) I saw this
"Exit efficiency in Trades V2 (Community Visualizers)... Is this right? "
didn't see
"Trades V2" became "Trades+"
I dropped avishn's(thanks) fix into the demo version & all is well.

Sorry for the confusion.

2) Ok that'll do thanks.

3) okey doke

Regards

profile picture

Eugene

#88
QUOTE:
I dropped avishn's(thanks) fix into the demo version & all is well.

Why would you need that? Simply install Community.Visualizers from this site.
profile picture

inrodwetrust

#89
QUOTE:
Why would you need that?


So I can add indicators values that can be sorted.
I haven't tried it yet but expect by adding a list/array to the position's tag property will do the trick.
But in the meantime the signal name will do.

Regards
profile picture

Eugene

#90
avishn
QUOTE:
Eugene, could you please make the latest Visualizer pack source code available? It seems that the one available on wiki is pretty old (2009.10?). Thank you.

Well, chances are I could make the updated source available. It will take unscheduled time to strip confidential (i.e. custom) code out to do that, and considering there's still a need to finish half a dozen providers and update the community extensions, let's aim at June/July.
profile picture

Eugene

#91
Community.Visualizers updated to 2010.06:

* Added: Win Rate + Profit Factor now accepts user-defined number of trades (requested by mikesblack)
profile picture

Eugene

#92
Community.Visualizers updated to 2010.07:

* Added: the Portfolio Inspector tool.

The Portfolio Inspector is a tool designed to show how the portfolio composition would look at any given day. It provides a holistic approach to portfolio analysis, acting as the Trades tab combined together with the Equity Curve chart, and giving even more insight with useful performance metrics from the Performance tab.

* By request of avishn, the project's complete source code is open again. Visit the project's Wiki section to get a copy.
profile picture

avishn

#93
Re: open source code

Thank you, much appreciated
profile picture

dansmo

#94
request for Trades+ view:
add a column for Position.Tag. That would be great.
profile picture

Eugene

#95
It doesn't sound reasonable to me, as the .Tag property contains variables of type object. Anything can be wrapped in such a variable.

IMHO it would be optimal if you have a custom build of the library and add the column yourself. The source code is open, and here's a step-by-step guide on adding a column to the Trades+ view:

Wiki FAQ | Miscellaneous, Extensions > Is there any way to add a column to the Trades visualizer and write data to it?
profile picture

dansmo

#96
Okay, will do it that way.
profile picture

dansmo

#97
Hi Eugene,

in tab Closed Equity: can you explain what could cause the difference between closed equity and strategy equity for a system that holds positions very short (3 bars).
And that causes the one curve to go sideways, while the other is growing steadily.
profile picture

Eugene

#98
For an open trade, closed equity is moving sideways and is updated after the trade is closed.
profile picture

dansmo

#99
Of course, that is the defition. But in a system that is very short term. How can there be a difference over 3 years??
profile picture

Eugene

#100
No idea what you're talking about. Entering a support ticket with complete backtest details and settings is the way to go.
profile picture

Eugene

#101
MS123 Performance Visualizer library (the new name for Community.Visualizers) is available for re-installation from our site to Wealth-Lab 6 customers.

Summary of changes in 2010.09:

* Changed: Strategy Equity + Drawdown %: optimal scaling of the Y axis according to the min/max of the equity value
* Changed: Possible to install in Wealth-Lab 6.x
* Fixed: Closed equity bug (found by dansmo) - open/closed equity misalignment on the chart
* Fixed: Portfolio Inspector exposure calculation bug (found by BlackPawn)
profile picture

Eugene

#102
Mainly a bugfix release, version 2010.10 still brings some comfort to the users of visualizers that have settings based on input:

* Win Rate + Profit Factor and Drawdown % now will save/restore their settings in Workspaces

Fixes:

* Fixed: Closed equity bug - didn't account for entry/exit commissions
* Fixed: Closed equity drawdown % bug - didn't account for entry/exit commissions
* Fixed: Performance+ & Community Scorecard bug - didn't account for entry/exit commissions
profile picture

dansmo

#103
Hi Eugene,

to me it seems that the bug is not fixed.
See the picture. The difference is exactly the amount for commissions.
profile picture

dansmo

#104
Also:
have a look at the x-axis of this picture. It does not start at the same point for the drawdown chart:
profile picture

Eugene

#105
QUOTE:
to me it seems that the bug is not fixed.

Regardless of what may seem, the bug is fixed in 2010.10:
CODE:
Please log in to see this code.

But there's a different bug with this visualizer, especially affecting futures backtests. Unfortunately, the issue is still undetermined.
QUOTE:
It does not start at the same point for the drawdown chart:

No big deal. The range is from 4 to 12 billions, and the ZedGraph control is supposedly having a hard time aligning the panes when one of them has labels that became quite wide. So it shrinks the upper pane. We'll leave it as is.
profile picture

dansmo

#106
Hmm, so Strategy equity = profit before commissions?

QUOTE:
But there's a different bug with this visualizer, especially affecting futures backtests. Unfortunately, the issue is still undetermined.


What is the bug?
profile picture

Eugene

#107
Strategy Equity excludes commissions but the Closed Equity did not (before 2010.10).

The bug was found and discussed here: Community Scorecard -- Drawdown % vs. Drawdown % (closed)
profile picture

Eugene

#108
Just one change in version 2010.11 of MS123 Performance Visualizers library:

* Added: Exposure to Community Scorecard ([LINK=/Forum/Posts/Maximum-Drawdown-Not-Available-In-Optimization-Results-Scorecard-31044#155173
]requested[/LINK] by augees)
profile picture

Eugene

#109
Not much of a change in 2011.02 but to fix a bug never hurts:

* Fixed: Portfolio Inspector - discrepancy between Month-To-Date and Year-To-Date numbers in January (found by BlackPawn)
profile picture

Eugene

#110
Version 2011.03 of MS123 Performance Visualizers finally fixes several long-standing bugs in all visualizers working with closed equity and/or drawdown based on closed equity:

* Fixed: Closed Equity - closed equity behavior incorrect in some cases
* Fixed: Closed Equity Drawdown % - closed DD might be incorrect in some cases
* Fixed: Performance+ - closed equity and Max.DD based on closed equity values were sometimes incorrect
* Fixed: Reverted a 2010.10 fix (closed equity didn't account for entry/exit commissions), N/A
profile picture

Eugene

#111
The Community Scorecard library -- a part of MS123 Performance Visualizers -- also receives a fix for closed equity related bugs in version 2011.03:

* Fixed: Max closed trade drawdown and Max closed trade drawdown (%) incorrect in some cases
profile picture

Eugene

#112
Version 2011.04 of MS123 Performance Visualizers is a maintenance release containing only one bug fix:

* Fixed: "Performance+": MAR, K, Sortino ratios, Ulcer Perf.Index showing 0s in RP mode -- designed for Portfolio Simulation mode only. (They will no longer be shown in Raw Profit mode).
profile picture

abegy

#113
Is it possible for a next release of ScoreCard and Performance Visualizers to have the following performance report added
http://www.hedgefund.net/pertraconline/statistics2000.cfm ?
profile picture

Eugene

#114
There's lots of performance metrics over there, some exist, some duplicate existing ones, some are too specific. Could you please name a couple of performance metrics that you have in mind as most valuable candidate(s) for Performance+ and/or the Community Scorecard?
profile picture

abegy

#115
I'm very interesting on the following "indicator" :
---> General Indicator
- Value Added Mouthly Index (VAMI)
- Skewness
- Kurtosis
- Beta
- Alpha
- Gain deviation
- Downside Deviation


---> Specific regarding the "benchmark index indicator"
- Tracking Error (Annualized)
- Jensen Alpha
- Active Premium
- Information Ratio
- UP Capture
- Down Capture
- Up Number Ratio
- Down Number Ratio
- UP Percentage Ratio
- Down Percentage Ratio
- The Percent Gain Ratio

In my point of view, the "Benchmark Index indicator" are interesting to see if your trading system works better when your "Buy and Hold" index is on a bull period...
profile picture

Eugene

#116
Sorry, these are way too specific to consider: too much workload involved in what is a custom/single-user solution. But it will be appreciated if any user is willing to contribute his code to the library.
profile picture

Eugene

#117
Version 2011.07 of MS123 Performance Visualizers and MS123 Scorecard is a key release bringing Combination Strategy support to nearly all included visualizers (with few exceptions). Please upgrade to Wealth-Lab 6.2 before installing/updating this extension.

Summary of changes

* Added: WL 6.2 Combo Strategy support:
* Added: Dropdown list for combo strategy children system selection to Closed Equity
* Added: Dropdown list for combo strategy children system selection to Contribution (see Notes)
* Added: Dropdown list for combo strategy children system selection to Strategy Equity + Drawdown
* Added: Dropdown list for combo strategy children system selection to Net Profit + Drawdown
* Added: Dropdown list for combo strategy children system selection to Win Rate + Profit Factor
* Added: Dropdown list for combo strategy children system selection to Closed Equity Drawdown
* Added: Dropdown list for combo strategy children system selection to Drawdown %
* Added: Dropdown list for combo strategy children system selection to Performance+
* Added: Dropdown list for combo strategy children system selection to Risk/Reward
* Added: Trades+: added combo child strategy name column
* Added: "Portfolio Inspector": new "Portfolio by system" tab: breakdown of positions/exposure by Combo child strategy
* Added: "Portfolio Inspector": "Portfolio by position" and "Trades" tabs now identify Combo child strategy name
* Added: "Closed Equity Drawdown %" now will save/restore settings in Workspaces
* Added: "Portfolio Inspector": Copy/Save equity chart to context menu ([LINK=/Forum/Posts/Log-scale-in-Equity-Curve-tab-Portfolio-InspectorTrade-Life-enhancements-31665#159598
]requested[/LINK] by tedclimo)
* Added: MS123 Scorecard: added maximum drawdown duration ([LINK=/Forum/Posts/Maximum-drawdown-duration-bars-in-MS123-Scorecard-31695
]requested[/LINK] by wouterv)
* Changed: Community Scorecard renamed to MS123 Scorecard
* Changed: compatible with version 6.2 and up

Notes

1. Although the Contribution tab has a usual dropdown list for selecting Combo child strategies, it is inactive due to a bug (to be fixed by WL 6.3).
2. "Trade Life" and "Trade Stability" are incompatible with Combo strategies

Version 2011.07.1, 06/21/2011:

Hotfix for a cosmetic issue: "Longest drawdown duration" and "Max Drawdown" columns were misplaced


Version 2011.07.2, 06/24/2011:

Fixed: long-standing intermittent Portfolio Inspector stability bug (thanks BlackPawn).
profile picture

Eugene

#118
MS123 Performance Visualizers and MS123 Scorecard has been updated to version 2011.08.

Change summary:

* Added: New performance visualizer: Open Positions which is a Trades+ for active positions (requested by VK)
profile picture

Eugene

#119
The project's source code has been updated. Both MS123 Performance Visualizers (demo) and MS123 Scorecard (full) are now available in their actual version, 2011.08.

Three visualizers are available in the demo version. This source code will help you get started building your textual, tabular and graphical Visualizers as well as Scorecards for strategy optimization and ranking.

Motivated developers can now utilize the power of Combination Strategies (requires WL 6.2) in their own visualizers, as the solution demonstrates how to build interactive controls for selecting Aggregate and Child equity performance results.
profile picture

abegy

#120
Is it possible to add in the Visualizer "Trade+" an extra columns to specify the type of order (stop, market, limit...) ?
I would like to have it to make some statistic (% of stop order...)
profile picture

Eugene

#121
It should be technically possible, but frankly, I don't think it's a good addition and here's why:

1. It's a popular library but you're the only one to ever ask for this feature in 3 years.
2. You'd agree with me that there must be two columns - one for entries and another for exits (assuming closed Position).

Thereby here we have the following options:

a. Quick workaround (DIY): append the order type as a string to a Position's entry/exit signal name. There you have it in the Entry/Exit signal name column, ready for copying to clipboard and/or saving to file.

b. Since you requested (and received) a fundamental data provider example before, you must have development skills. In this case, it won't take you much time to modify the open source code of the Trades+ visualizer and have a custom build. Should you need any assistance with this, please fire away with questions (in a new thread) - I'll be glad to help.
profile picture

Eugene

#122
In the latest update of MS123 Performance Visualizers and MS123 Scorecard, version 2011.09.10:

* Added: "Expectancy" to Performance+ and MS123 Scorecard (requested by IgalMar7)
* Exposed some performance metrics in PerformanceEngine class (requested by ewessely): Average Profit/Loss %/Abs, Count of Winning/Losing Trades, Gross Profit/Loss

Important note to users of Expectancy:

Van Tharp changed his well-known Expectancy formula in 2nd edition of "Trade Your Way to Financial Freedom". Previously known and widespread as...

Expectancy = (Probability of Win * Average Win) – (Probability of Loss * Average Loss)

...it is named incorrect by its author. The correct formula from 2nd edition of the book is:

Expectancy = ((Probability of Win * Average Win) – (Probability of Loss * Average Loss)) / Average Risk.

Needless to say, this is the formula used in Performance+ and MS123 Scorecard. Therefore it is required that your system has a defined RiskStopLevel or the value will be NaN (not a number)!
profile picture

Eugene

#123
MS123 Performance Visualizers and MS123 Scorecard has been updated to version 2011.11.

Highlights:

* Added: Expectancy (Traditional) to Performance+ and MS123 Scorecard (courtesy IgalMar7)

Expectancy traditional = (Probability of Win * Average Win) – (Probability of Loss * Average Loss)

* Fixed: Risk/Reward: possible hang (found by akardar1)
profile picture

Eugene

#124
Known bug: Expectancy (traditional) has a bug - always returns 0 (zero). Will be fixed by upcoming build.
profile picture

Steffen

#125
HELP!

I need the MS123 Scorecard for WL 6.2
Where can i get it?

Stn
profile picture

Eugene

#126
MS123 Scorecard is part of the MS123's Performance Visualizer library. Make sure you've upgraded to WLD 6.3. After installing the extension and restarting WLD, open a Strategy Window, click "Optimization", switch to the Results tab and select "MS123 Scorecard" before running the optimization.

And if the question is "how do I downgrade the library to make it work in WL 6.2?", then the answer is: you can't (unless you kept a local backup). Download WLD 6.3 and let it do the upgrade.
profile picture

Eugene

#127
MS123 Performance Visualizers and MS123 Scorecard has been updated to version 2012.03.

This is purely a WLP/D Version 6.3 compatibility release.

If you want to continue using "Trades+" and "Portfolio Inspector" in WL 6.3, you'll be required to update the library to the latest version. ALL previous versions of these visualizers will not work in WL 6.3, will generate an exception message and will unload.

Consequently, library v2012.03 is NOT backward compatible. Do not update if you plan to roll back to WLP/D Version 6.2 and below because it will not work there (or perform a backup).
profile picture

streak

#128
In case of need to rollback after upgrading to 6.3 is it possible to backup "MS123 Performance Visualizers and MS123 Scorecard" ?

If so which files relate?

Thanks
Jon
profile picture

Eugene

#129
WealthLab.Visualizers.MS123.dll
WealthLab.Visualizers.Extra.dll
profile picture

Eugene

#130
Version 2012.03.1 has been released.

* New: Profit Factor, Recovery Factor, and Ulcer Index added to MS123 Scorecard (requested by wl64bit)
* Fix: Portfolio Inspector: unhandled exception when testing on non-overlapping data ranges (reported by alex arzh)
profile picture

Eugene

#131
MS123 Visualizers and MS123 Scorecard has been updated to version 2012.05.

Change summary:

* New: Max Consecutive Winners and Max Consecutive Losers added to MS123 Scorecard (based on request of ''Yury'')
* Fix: shared ZedGraph library will no longer be removed when uninstalling the extension
* Change: (internal) reorganized assembly, split into multiple modules:

WealthLab.Visualizers.MS123.dll
WealthLab.Visualizers.MS123.Helper.dll
profile picture

Musashi1970

#132
It seems that the "Performance+"-tab is not working anymore, after updating to the latest Visualizer Library...
profile picture

Eugene

#133
Sorry Patrick, my bad: a required component is not being downloaded with the latest updated. The problem has already been recognized, and later today a hotfix will be uploaded.

Also, three more extensions are affected by this problem (Dukascopy provider, MS123 Extra Fundamental/News Providers, Community Components). Likewise, they will receive an update shortly.
profile picture

Eugene

#134
Important note to the users of the PerformanceEngine class (internal, unsupported part of the MS123 Visualizers library):

The information regarding PerformanceEngine calling conventions provided across the forum before is actual as of the library version 2012.05.1 and earlier. In future versions, the syntax will most likely undergo a breaking change due to a complete rewrite of the PerformanceEngine class.
profile picture

JDardon

#135
Would it be possible to have a visualizer that can classify results as per Entry/Exit Signal?
Something a la Reports Lab 2.0 Allocation per Signal view.

profile picture

JDardon

#136
It would be great if you guys could release at least the planned interface changes before the final release of the library code. This would give us the opportunity to asses the change before we actually get the new coded library.
profile picture

Eugene

#137
QUOTE:
Something a la Reports Lab 2.0 Allocation per Signal view.

Great idea Jorge, and about time. The Visualizer library right now is being rewritten, and extending the Contribution chart with net profit by entry/exit signal sounds like an interesting addition. Thanks, I'll mark it for review.
QUOTE:
It would be great if you guys could release at least the planned interface changes before the final release of the library code.

With all respect, this is not an interface but an internal and undocumented class. The syntax changes are not carved in stone, and we're supposedly well ahead of its release date (in fact, I don't have any idea on ETA at this moment). So I'm giving motivated developers this heads-up now.
profile picture

Eugene

#138
A big update is still in the works (working out some cosmetic issues). Basically, the library has been rewritten for:

* better graphics
* faster speed (including parallel execution and multi-CPU support)
* cleaner interface (2 times less tabs with same functionality)
* new and requested features
* fixes, and more
profile picture

Eugene

#139
This thread is now closed.

Please DO NOT post anything here.

The new MS123 Visualizers restarts here:


NEW MS123 Performance Visualizers library and MS123 Scorecard
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).