Here comes a new platform feature on ALGOGENE to directly work with Jupyter Notebook!
What is Jupyter Notebook?
As its name, Jupyter Notebook is an interactive development environment which allows you to create and share documents that contain live code, equations, narrative text, paragraph, figures, links, etc.
You can perform the following tasks with a Jupyter Notebook:
- pre-backtest analysis;
- data transformation;
- numerical simulation;
- statistical modeling;
- data visualization;
- machine learning;
- many more ...
What is Jupyter Dashboard?
In addition to displaying/editing/running notebook documents, the Jupyter Notebook App also has a control panel (called Jupyter Dashboard). It shows local files and allows to open notebook documents and shut down their kernels. It functions like a usual file explorer in a desktop computer for document management.
What is Notebook Kernel?
A notebook kernel is a computational engine that executes the code contained in a Notebook document. When you open a Notebook document, ALGOGENE will automatically assign a partition of computer resource and launch the associated kernel. The kernel performs the computation and produces the results when a notebook is executed. Depending on the type of computations, a kernel process might be shutted down if it consumes significant CPU and RAM beyond the assigned limit.
How can I get start?
After login ALGOGENE platform,
- go to [My History] > [Jupyter Notebook]
- you will get to Jupyter Dashboard after kernel is initialized
- you can then create a new notebook document
Example 1: basic operation
In a notebook document, there are 2 typical cell elements.
- markdown cell - to display text
- code cell - to run live code
We can firstly insert markdown cells as a document heading.
We can also create code cells to run some simple operations.
Example 2: charting
Let's continous to create a new code cell. Now, we make up a random dataset and plot a simple x-y chart.
To use "matplotlib" in Jupyter, we need to add %matplotlib inline at the beginning.
Example 3: data query
Now, let us try query some real-time news from the server.
Example 4: visualize market data
This example shows you how to query historial closing price of EURUSD, and then display the data in a line chart.
Now, you learnt what Jupyter Notebook can do. It is time for you to explore the data and build your trading model!