Giter VIP home page Giter VIP logo

lean-monitor's Introduction

Lean Algorithm Monitor

Introduction

Lean Algorithm Monitor is an open-source Windows Desktop based tool to browse Lean engine's backtest and live monitor progress and results.

alt tag

Lean C# Algorithmic Trading Engine

This tool visualizes data generated by the Lean Engine. Lean Engine is an open-source fully managed C# algorithmic trading engine built for desktop and cloud usage. Lean drives the web based backtesting platform QuantConnect.

Building the solution

The solution has been built using Microsoft Visual Studio 2017 (Community Edition). Make sure to restore NuGet packages if your environment is not configured to Restore them automatically when building. The solution has a reference to the QuantConnect.Common Namespace in the QuantConnect.Common.dll library. This file is not included and can be compiled from the Lean project.

Starting the application

The monitor supports two modes: File and Stream.

Opening a file

The monitor can read exported .JSON files (i.e. by the Quant Connect Algorithm Lab) or exported by the Monitor itself.

  • Star the application and provide the path to the .JSON file in the Open Session > From File tab.
  • When Monitor for changes has been enabled, the monitor will watch the file for changes. When they occur, all new data since the last time it has been opened will be appended.

Starting from a stream

The monitor reads status messages generated by the Lean StreamingMessageHandler, just like the default Views application included with the Engine.

  • Configure the Launcher configuration file. The has an example named backtesting-desktop.
  • Alter the desktop-exe to point to the compiled Monitor.exe
  • Option: When using the example, disable the send-via-api if you do not want to use API functionality. The API is not required to plot charts.

Issues and Feature Requests

This tool has initially been built for personal purposes. it is a proof-of-concept (Alpha) and might contain bugs including performance issues and incorrect calculations among others. Please submit bugs and feature requests as an issue to the AlgorithmMonitor Repository. Contributions are welcomed!

lean-monitor's People

Contributors

mirthestam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lean-monitor's Issues

miss QuantConnect.SeriesType.Treemap

  "Charts": {
    "Alpha Assets": {
      "Name": "Alpha Assets",
      "ChartType": 0,
      "Series": {
        "SPY": {
          "Name": "SPY",
          "Unit": null,
          "Index": 0,
          "Values": [
            {
              "x": 1381498260,
              "y": 81.0
            }
          ],
          "SeriesType": 7,
          "Color": "",
          "ScatterMarkerSymbol": "none"
        }
      }
    },

the SeriesType 7 not support

Emphasize statistic values indicating a problem

As user, I would like to see bad values emphasized. In example, the Net Profit statistic should be shown with a red background to notify me of this possible problem.

Note not all negative values are automatically bad. In example the Fees Runtime statistic is completely ok when negative. However, the a negative Return value is obviously a problem.

This applies to:

  • Runtime statistics
  • Overall statistics
  • Trades
  • Profit & Loss

StockPlots

As a user I would like to see the stockplots of the stocks in my strategy. I also would like to see my trades on this chart.

The Lean engine does not send stockplot data using messages to prevent flooding the queue. It provides the concept of subscriptions. however, this has not been implemented. (Probably it is implemented in the API for QuantConnect itself).

This tool should support the local LEAN engine. I do not prefer to require modifications to this engine to get this data into the tool.

A workaround is to require the user to use manually add this chart using Plot(symbol, symbol, value.Price);
This way we can identify the chart based upon the symbol name, and append the trades onto the chart. Question: Is this a user friendly solution? Will this work given the chart point limit configured in Lean?

Note there is no TriangleDown implementation in LiveCharts. we need to create is based upon the TriangleUp implementation.

Strategy Equity tab: vertical separators are unaligned

The Strategy Equity tab shows Equity chart as well as Daily Performance chart. However, the vertical separator lines (below the date labels) are unaligned.

This might be caused by the difference in series type. In this case, the Equity chart has Ohlc series, and the Daily Performance chart has Column series.

Streaming data problems with Strategy Equity Chart

When reading data from a stream, the Strategy Equity Chart appears to have problems.

The Benchmark series does not end at the same Y index as the Equity series. Probably something is wrong with the calculation of the benchmark, or the data merge when updates are received.

Build issue

It looks like the latest version has a build problem with the out port parameter and ?? null checking before throwing an exception.

.net 4.5.2

LiveResult support

As a user running live algorithms, I would like to be able to attach to a running session to see its current performance, or to open a exported live result to review previous live sessions.

  • The FileSession supports BacktestResult. It should support LiveResult.
  • the StreamSession already supports LiveResult however there are problems merging live data and display in the charts.

I need to investigate how live support is shown in QuantConnect first before implementing live support.

how to use lean-monitor

if you start quantconnect and lean-monitor, there are two different result in there view,for example, the Equity is different, i dont konw how to use? only start quantconnect there dont show the chart ,only show the static result

Pressing `Alt` sometimes causes unhandled exception

Pressing Alt sometimes causes unhandled exception with message

'{DependencyProperty.UnsetValue}' is not a valid value for property 'FocusVisualStyle'.

This is probably a problem with a property named FocusVisualStyle in the custom blend theme.

Not seeing charts

Hey,

Thanks for creating this project, it's exactly what I was looking for in order to execute offline backtests using Lean.

I have just tried it, and I get 5 different panes, though none of them include charts:
image

Server (API) Support

Functionality to open a result using the API.
Optionally, a dockable panel as some kind of 'Server explorer' to view projects, and results

Display Rolling Statistics

As user analyzing a backtest result, I would like to see my rolling statistics. I would like to see them similar to the Algorithm Lab at QuantConnect.com.

This implies a new Tab between Profit & Loss and Log.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.