<jupyter_start><jupyter_text>Algorithm Analysis notebook Start AlgorithmAnalysis- Add the references and imports- Create a AlgorithmAnalysis instanceFind your user id and api access token at https://www.quantconnect.com/account<jupyter_code>%matplotlib inline
# Imports
from clr import AddReference
AddReference("System")
AddReference("QuantConnect.Common")
AddReference("QuantConnect.Jupyter")
from QuantConnect import *
from QuantConnect.Jupyter import *
from datetime import datetime
import matplotlib.pyplot as plt

user_id = 0
api_access_token = ""

# Create an instance
aa = AlgorithmAnalysis(user_id, api_access_token)<jupyter_output><empty_output><jupyter_text>List projects*It may take a few seconds if you have a lot of projects*<jupyter_code>aa.ListProjects().head(10)   # List the 10 last modified projects<jupyter_output><empty_output><jupyter_text>List backtestsLists all backtest from a given project*It may take a few seconds if you have a lot of projects*<jupyter_code>aa.ListBacktests(628051)<jupyter_output><empty_output><jupyter_text>Read out the orders of a specific backtest<jupyter_code>aa.GetOrders(628051, "4fdd334f2a04c0197342b6870bcc93d1")<jupyter_output><empty_output><jupyter_text>Read out the P/L of a specific backtestUse DataFrame cumsum method to compute the cumulative returs and plot<jupyter_code>aa.GetProfitLoss(628051, "f2f9b85264e5edd4c9ea957a314ec573").cumsum().plot()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.07788595271210014, 'fraction_numerical': 0.04381084840055633, 'mean_word_length': 8.52980132450331, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '431001', 'license': 'Apache-2.0', 'n_tokens_mistral': 506, 'n_tokens_neox': 466, 'n_words': 119, 'path': 'Jupyter/BasicAlgorithmAnalysisTemplate.ipynb', 'repo_name': 'yarray/Lean', 'size': '1438'}