pretty backtest viewer in Jupyter

User avatar
Strange
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

pretty backtest viewer in Jupyter

Post by Strange »

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?
--That word, you keep using that word! I don't think it means what you think it means
User avatar
gmetric_Flow
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

pretty backtest viewer in Jupyter

Post by gmetric_Flow »

If you are intent on using python, you can take a look at something like Dash or Apache Superset.
User avatar
tbretagn
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

pretty backtest viewer in Jupyter

Post by tbretagn »

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
User avatar
Maggette
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

pretty backtest viewer in Jupyter

Post by Maggette »

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...
User avatar
nikol
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

pretty backtest viewer in Jupyter

Post by nikol »

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
User avatar
Strange
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

pretty backtest viewer in Jupyter

Post by Strange »

> 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.
--That word, you keep using that word! I don't think it means what you think it means
User avatar
Strange
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

pretty backtest viewer in Jupyter

Post by Strange »

> 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.
--That word, you keep using that word! I don't think it means what you think it means
User avatar
Maggette
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

pretty backtest viewer in Jupyter

Post by Maggette »

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...
User avatar
Strange
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

pretty backtest viewer in Jupyter

Post by Strange »

Bokeh looks like more or less exactly what I want and it's easy enough to integrate into my existing workflow! Thank you!
--That word, you keep using that word! I don't think it means what you think it means
User avatar
cordura21
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

pretty backtest viewer in Jupyter

Post by cordura21 »

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
Post Reply