Jupyter Notebook on Blueshift ============================= Blueshift includes a ``Jupyter Notebook`` interface for open ended research. Blueshift Jupyter Notebook interface allows us to have an open ended exploratory analysis capabilites to form trade ideas before moving on to testing ( backtesting or paper trading) and deployment on the platform. Blueshift works differently on Jupyter Notebook than what you would have written in a regular strategy code. The major difference is there is no running algo or associated algo event loop. This means none of the event handler functions are available. Also, since there is no running algo, none of the algo specific APIs - including ``context``, ``data`` or anything that is imported from ``blueshift.api`` are not available either. Instead we rely on the a set of functions imported from the ``blueshift.research`` module, to query the built-in datasets and build our exploratory models using the Python packages available on the platform. NoteBook Workflow ------------------ The Blueshift research workflow using the Jupyter notebook usually starts with selecting a dataset on which to run further analysis. .. code-block:: python from blueshift.research import list_datasets, use_dataset # list the available datasets list_datasets() # select dataset. You can change it at any point in time use_dataset('nse') Once a dataset is selected, we can use the other API functions from the research module. .. code-block:: python from blueshift.research import use_dataset, symbol. history # select dataset. You can change it at any point in time use_dataset('nse') # get a reference to the asset object asset = symbol('ACC') prices = history(asset, 'close', 20, '1m') prices.plot() .. important:: The `blueshift.api` API functions are not usable in the Blueshift notebooks environment. Similarly, in a strategy code, you should not import from `blueshift.research`. Also, in notebooks, additional Python packages for plotting - `matplotlib` and `plotly` - are available. Research (NoteBook) APIs ------------------------- The following are the available API functions in the Blueshift notebook environment .. py:module:: blueshift.research :noindex: .. autofunction:: list_datasets .. autofunction:: use_dataset .. autofunction:: symbol .. autofunction:: sid .. autofunction:: current .. autofunction:: history .. autofunction:: run_pipeline .. autofunction:: get_data_portal Example Notebooks ------------------ .. toctree:: Notebooks/Getting Started.ipynb Notebooks/Technical Analysis.ipynb Notebooks/Understanding Pipelines.ipynb