Forums  > Software  > pretty backtest viewer in Jupyter  
     
Page 1 of 1
Display using:  

Strange


Total Posts: 1591
Joined: Jun 2004
 
Posted: 2019-06-19 12:52
I was visiting someone yesterday and he showed me a very good looking interactive backtest viewer written entirely in python that was served via a web page. Don't think it was jupyter based, but I might be wrong.

By chance, could you guys think of what libraries/components go into something like this and is it something that can be built by a mere mortal like myself?

"In Russia, every CDS ends in bullet payment"

gmetric_Flow


Total Posts: 23
Joined: Oct 2016
 
Posted: 2019-06-19 13:14
If you are intent on using python, you can take a look at something like Dash or Apache Superset.

tbretagn


Total Posts: 281
Joined: Oct 2004
 
Posted: 2019-06-19 13:54
There's the quantopian stuff which i'm sure you can port to flask/dash/holoviews/bokeh?

Et meme si ce n'est pas vrai, il faut croire en l'histoire ancienne

Maggette


Total Posts: 1161
Joined: Jun 2007
 
Posted: 2019-06-19 14:13
Not exactly sure what an " interactive backtest viewer" is doing? A kind of interactive dashboard for backtest results?

More often than not I end up with something close to a "star schema" (results obtained by different parameters, methods, features... etc) and use tableau to create on the fly dash boards. It isn't as flexible as a lot of other options.....but I have to do a lot of them for different tasks, and it works well enough for most things.

Actually one of the few reasons I still have a windows around:).

Ich kam hierher und sah dich und deine Leute lächeln, und sagte mir: Maggette, scheiss auf den small talk, lass lieber deine Fäuste sprechen...

nikol


Total Posts: 818
Joined: Jun 2005
 
Posted: 2019-06-19 14:16
With GUI-visualization items I always feel retarded. However, slowly I got hand over tkinter and it is really cool. Matplotlib integration works and all related widgets too.

People told me to look into ipywidgets

I am personally cautious about using browser, but for example this kind of visualisation makes me excited.

visjs

with python
https://stackoverflow.com/questions/38364435/python-matplotlib-make-3d-plot-interactive-in-jupyter-notebook

Strange


Total Posts: 1591
Joined: Jun 2004
 
Posted: 2019-06-19 14:33
> If you are intent on using python, you can take a look at something like Dash or Apache Superset.

Actually, I just asked him and Apache Superset is what he's using. What he has looks like a full blown application, with a lot of nifty visualizations - I am sure a lot of thought went into it and I think it would be a massive effort for me to build something like that. I might try to whip up something much simpler.

> There's the quantopian stuff which i'm sure you can port to flask/dash/holoviews/bokeh?

It's not about the analytics (got that covered already) and more about the presentation/interaction which at the moment I don't have. I would imagine most seasoned people would want a lot of custom metrics (e.g. I need a lot of the vol-related stuff that would not be found anywhere) while some stat arb or CTA-type guy will need a very different set of outputs.

"In Russia, every CDS ends in bullet payment"

Strange


Total Posts: 1591
Joined: Jun 2004
 
Posted: 2019-06-19 14:44
> Not exactly sure what an " interactive backtest viewer" is doing? A kind of interactive dashboard for backtest results?

Yeah, something like that. You know, show the backtest pnl curve and realized pnl curve, draw-downs, monthly pnl table, table with various metrics etc.

The approach he took was to have 3 separate views - "in-depth" for a single strategy version with all sort of details, "pair comparison" for comparing two strategies and "strategy cloud" view where we can see the combination of parameter tweaks and such stuff. He has put a fair bit of thought into it so it all looked very polished. While none of the analysis was new to me (nor would his metrics be applicable, really), I found it looking very handy.


"In Russia, every CDS ends in bullet payment"

Maggette


Total Posts: 1161
Joined: Jun 2007
 
Posted: 2019-06-19 15:24
Then bokeh might be for you:

bokeh examples
bokeh exmaples 2
bokeh example 3

Or R shiny
here

Ich kam hierher und sah dich und deine Leute lächeln, und sagte mir: Maggette, scheiss auf den small talk, lass lieber deine Fäuste sprechen...

Strange


Total Posts: 1591
Joined: Jun 2004
 
Posted: 2019-06-19 16:11
Bokeh looks like more or less exactly what I want and it's easy enough to integrate into my existing workflow! Thank you!

"In Russia, every CDS ends in bullet payment"

cordura21


Total Posts: 237
Joined: Aug 2009
 
Posted: 2019-06-19 17:51
Try QlikSense. It's very good, and I think the desktop version is free.

If you have nice data pre-processed output files you can build great dashboards super fast.
Plus, you can build relationships between metadata and data super fast, even automatically.

And it has sync'd combing and filtering, native functions, etc.... Really liked it, try it.

https://www.qlik.com/us/products/qlik-sense

Cheers, Cord

Vespertilio homo est cientificus

longGamma


Total Posts: 14
Joined: Jan 2019
 
Posted: 2019-06-19 19:48
Python/Flask and plotly. Highcharts is also useful (great heatmaps), but requires Javascript.

I found bokeh to be unnecessarily complex. What one can do in plotly in 50 lines of code is x10 that in Bokeh.


FatChoi


Total Posts: 126
Joined: Feb 2008
 
Posted: 2019-06-20 09:43
Jupyter voilà is new but looks very helpful.

Have done some good things with Plotly and Dash.

cordura21


Total Posts: 237
Joined: Aug 2009
 
Posted: 2019-06-20 16:57
Sorry, I didn’t that you don’t need any programming with QlikSense.

BTW I am not affiliated in any way. Just had a pretty good and fun experience with it.
Cheers, Cord

Vespertilio homo est cientificus

Strange


Total Posts: 1591
Joined: Jun 2004
 
Posted: 2019-06-20 17:42
After looking at options, I decided to go with Bokeh and actually built a semi-functional prototype last night (by hacking one of their examples).

"In Russia, every CDS ends in bullet payment"

Maggette


Total Posts: 1161
Joined: Jun 2007
 
Posted: 2019-06-20 17:48
I worked only with bokeh so far, but must admit that LongGamma might have a point.

You shouldn't compare Plotly with Bokeh, but Ploty Dash with Bokeh, and after looking at it a bit it might be possible that I migrate to Dash in the future.

A fair comparison IMHO:
https://blog.sicara.com/bokeh-dash-best-dashboard-framework-python-shiny-alternative-c5b576375f7f

In bokeh:
https://bokeh-dashboard-example.herokuapp.com/app

in dash:
https://dash-dashboard-example.herokuapp.com/

Ich kam hierher und sah dich und deine Leute lächeln, und sagte mir: Maggette, scheiss auf den small talk, lass lieber deine Fäuste sprechen...

Strange


Total Posts: 1591
Joined: Jun 2004
 
Posted: 2019-06-21 01:44
Well, it's too late since I kinda gotten to the point where the two screens i need kinda-sorta-work. Not polished, but good enough for finance :0

"In Russia, every CDS ends in bullet payment"
Previous Thread :: Next Thread 
Page 1 of 1