Ever used a strategy that produced a nice graphic usig the ScottPlot library?
Ever felt the urge to look at the data in more detail?
Resize, Zoom in, show individual values?
Then this extension is right for you: finantic.InteractiveGraphics.
It adds a single window to Wealth-Lab. This window cointains a canvas that can be used to show up to four plots.
The plots are produced by any (your?) coded Sstrategy using the versatile ScottPlot library.
single curves, multiple curves, scatterplots, barplots, and so on.
The possibilities are endless...
The extension comes with four example strategies. Check them out!
Wealth-Lab has always (since WL3, I guess) been a great too for research. With the ability to produce graphics ready for publication it is even better now!
See here for details: https://www.wealth-lab.com/extension/detail/finantic.InteractiveGraphics
#finantic
Ever felt the urge to look at the data in more detail?
Resize, Zoom in, show individual values?
Then this extension is right for you: finantic.InteractiveGraphics.
It adds a single window to Wealth-Lab. This window cointains a canvas that can be used to show up to four plots.
The plots are produced by any (your?) coded Sstrategy using the versatile ScottPlot library.
single curves, multiple curves, scatterplots, barplots, and so on.
The possibilities are endless...
The extension comes with four example strategies. Check them out!
Wealth-Lab has always (since WL3, I guess) been a great too for research. With the ability to produce graphics ready for publication it is even better now!
See here for details: https://www.wealth-lab.com/extension/detail/finantic.InteractiveGraphics
#finantic
Rename
I like how the ScottPlot window plugin can host multiple plots. Besides generating an equity plot, I'll include a beta-regression plot. There are two things I'm looking for in the beta-regression plot.
1) How far is the "current price" from the regression line? Is the stock oversold (a good value) or overbought?
2) Is the index employed for the beta regression a good fit? In other words, is the R-Squared of the regression high enough or should one be using a different index for the regression? (I typically use the S&P 500 as the index for large cap stocks.)
ScottPlot has a simple Statistics class that will calculate common statistics like R-Squared. There are some robust statistics metrics as well.
1) How far is the "current price" from the regression line? Is the stock oversold (a good value) or overbought?
2) Is the index employed for the beta regression a good fit? In other words, is the R-Squared of the regression high enough or should one be using a different index for the regression? (I typically use the S&P 500 as the index for large cap stocks.)
ScottPlot has a simple Statistics class that will calculate common statistics like R-Squared. There are some robust statistics metrics as well.
QUOTE:
ScottPlot has a simple Statistics class
I'd use ScottPlott for the plotting only.
Use MathNet.Numerics for any interesting calculations.
If you have some finantic extensions installed chances are you already find MathNet.Numerics.dll in WL's installation folder
(usually C:\Program Files\Quantacula, LLC\WealthLab 8)
Then you can use MathNet.Numerics in your strategies without any further actions.
(Otherwise you need to download and copy the DLL)
See https://numerics.mathdotnet.com/ for details.
For the sample Growth vs Volatility plot, I added a check for NaN in Initialize; otherwise, one doesn't get a plot for the WealthData NASDAQ 100 dataset.
The Clear() operation can be omitted, but then context (such as last color plotted) from the last plot is retained. What I did instead is move the Clear() into BacktestComplete.
I can do the zoom to fit the screen, but there's no way to create a selection box to zoom from.
How can I omit the Rendered in 03.15ms part?
CODE:
public override void Initialize(BarHistory bars) { // collect data double growth = ROC.Value(bars.Count-1, bars.Close, bars.Count-1); // Growth ATRP atrp = new ATRP(bars, 2); double vola = SMA.Value(bars.Count-1, atrp, bars.Count-1); // Vola: Average ATRP if ( !(double.IsNaN(vola) || double.IsNaN(growth)) ) //avoid plotting NaN results { volaList.Add(vola); growthList.Add(growth); symbolList.Add(bars.Symbol); // Symbol } }
The Clear() operation can be omitted, but then context (such as last color plotted) from the last plot is retained. What I did instead is move the Clear() into BacktestComplete.
CODE:
public override void BacktestComplete() { PlotHost.Instance.Clear(); // Generate ScatterPlot Plot plt = PlotHost.Instance.Plot1; . . .
I can do the zoom to fit the screen, but there's no way to create a selection box to zoom from.
How can I omit the Rendered in 03.15ms part?
Did you discover Right Mouse Click->Help ?
QUOTE:
Did you discover Right Mouse Click->Help ?
Thank you. I don't have a middle mouse button, but the ALT+Left-click+drag works well to create a zoom box.
I've noticed the image resampling filter (for resizing the window) blurs the fonts on the plot some compared to writing out a *.png file of "defined" pixel dimensions. I'm guessing I'll have to live with that unless there's a way to re-render the image each time it's resized. I don't mind the plot looking muddy, but it would be nice to have the fonts look as sharp as possible after resizing.
Your Response
Post
Edit Post
Login is required