diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/roi.json b/Projects/Superalgos/Schemas/Docs-Nodes/roi.json index 710b5f514..7450790ca 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/roi.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/roi.json @@ -4,9 +4,75 @@ "text": "ROI is a ratio that compares the profit loss with the cost of the investment, expressed as a percentage." }, "paragraphs": [ + { + "style": "Block", + "text": "Content", + "updated": 1611332841853 + }, { "style": "Text", - "text": "Left click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode." + "text": "In general financial terms, ROI is equal to the Net Return on Investment divided by the Cost of Investment, expressed as a percentage." + }, + { + "style": "Text", + "text": "In Superalgos, the Net Return on Investment is the profit loss, as defined elsewhere. The Cost of Investment is solely the begin balance, as the fees are subtracted from the balance to calculate the profit loss, so we don’t need to account for them in the divisor side of the ratio." + }, + { + "style": "Text", + "text": "That is:" + }, + { + "style": "Javascript", + "text": "ROI = profit loss / begin balance * 100" + }, + { + "style": "Text", + "text": "In the context of the episode base asset and episode quoted asset, the calculation is done relative to the corresponding assets, and the overall context." + }, + { + "style": "Text", + "text": "The formula:" + }, + { + "style": "Javascript", + "text": "tradingEngine.current.episode.episodeBaseAsset.ROI.value =\n tradingEngine.current.episode.episodeBaseAsset.profitLoss.value /\n tradingEngine.current.episode.episodeBaseAsset.beginBalance.value * 100 \n \ntradingEngine.current.episode.episodeQuotedAsset.ROI.value =\n tradingEngine.current.episode.episodeQuotedAsset.profitLoss.value /\n tradingEngine.current.episode.episodeQuotedAsset.beginBalance.value * 100", + "updated": 1611332768337 + }, + { + "style": "Text", + "text": " " + }, + { + "style": "Text", + "text": "In the context of the position base asset and position quoted asset, the size filled is used instead of the balance, so that ROI may be properly calculated for complex execution algorithms.", + "updated": 1611332787435 + }, + { + "style": "Text", + "text": "The formula:" + }, + { + "style": "Javascript", + "text": "tradingEngine.current.position.positionBaseAsset.ROI.value =\n tradingEngine.current.position.positionBaseAsset.profitLoss.value * 100 /\n tradingEngine.current.strategyOpenStage.stageBaseAsset.sizeFilled.value\n \ntradingEngine.current.position.positionQuotedAsset.ROI.value =\n tradingEngine.current.position.positionQuotedAsset.profitLoss.value * 100 /\n tradingEngine.current.strategyOpenStage.stageQuotedAsset.sizeFilled.value", + "updated": 1611332799800 + }, + { + "style": "Text", + "text": "In the context of the episode statistics, the calculation is done using the consolidated balance, as explained in the profit loss definition.", + "updated": 1611332810457 + }, + { + "style": "Text", + "text": " Note: When the context does not refer to either of the assets in particular, then both asset balances are consolidated, and denominated in the quoted asset." + }, + { + "style": "Text", + "text": "The formula:" + }, + { + "style": "Javascript", + "text": "tradingEngine.current.episode.episodeStatistics.ROI.value =\n (\n tradingEngine.current.episode.episodeBaseAsset.profitLoss.value * \n tradingEngine.current.episode.endRate.value +\n tradingEngine.current.episode.episodeQuotedAsset.profitLoss.value\n ) / (\n tradingEngine.current.episode.episodeBaseAsset.beginBalance.value * \n tradingEngine.current.episode.beginRate.value +\n tradingEngine.current.episode.episodeQuotedAsset.beginBalance.value\n ) * 100", + "updated": 1611332824026 }, { "style": "Block", diff --git a/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-009-distance-to-events.json b/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-009-distance-to-events.json new file mode 100644 index 000000000..f3712aae0 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-009-distance-to-events.json @@ -0,0 +1,30 @@ +{ + "topic": "Trading Engine", + "pageNumber": "9", + "type": "Distance to Events", + "definition": { + "text": "Track the number of periods that have passed since the last occurrence of each type of event. On this page: Trigger On, Trigger Off, Take Position, Close Position, Next Phase, Move to Phase, Create Order, Cancel Order, Close Order.", + "updated": 1611327154424 + }, + "paragraphs": [ + { + "style": "Include", + "text": "Superalgos->Node->Distance To Event->Definition", + "updated": 1611327304404 + }, + { + "style": "Include", + "text": "Superalgos->Node->Distance To Event->Content", + "updated": 1611327325113 + }, + { + "style": "Include", + "text": "Superalgos->Concept->Reusable Snippets->Note for Hierarchy Tables No Discussion" + }, + { + "style": "Hierarchy", + "text": "Superalgos->Distance To Event->2", + "updated": 1611327347651 + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-010-balances.json b/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-010-balances.json new file mode 100644 index 000000000..50e375fe7 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-010-balances.json @@ -0,0 +1,69 @@ +{ + "topic": "Trading Engine", + "pageNumber": "10", + "type": "Balances", + "definition": { + "text": "Keep track of the balances of each asset, at different points in time. On this page: Balance, Begin Balance, and End Balance.", + "updated": 1611331647405 + }, + "paragraphs": [ + { + "style": "Text", + "text": "Balances are the basis of the account-keeping features, by which you may know exactly how much of each asset there is on the account at any given point in time.", + "updated": 1611331659066 + }, + { + "style": "Text", + "text": "The system keeps track of balances in multiple contexts, but also saves snapshots of what the balance was at key moments in time, so that such information may be available both to study the results of operations, and so that it may be used form within trading strategies." + }, + { + "style": "Callout", + "text": "It is important to understand that balances are an internal concept managed by the trading engine, and are calculated based on the information processed by the trading bot. Balances do not necessarily reflect the actual amount of assets at the exchange." + }, + { + "style": "Title", + "text": "Balance", + "updated": 1611331710709 + }, + { + "style": "Include", + "text": "Superalgos->Node->Balance->Definition", + "updated": 1611331715062 + }, + { + "style": "Include", + "text": "Superalgos->Node->Balance->Content", + "updated": 1611331718713 + }, + { + "style": "Title", + "text": "Begin Balance", + "updated": 1611331731595 + }, + { + "style": "Include", + "text": "Superalgos->Node->Begin Balance->Definition", + "updated": 1611331735070 + }, + { + "style": "Include", + "text": "Superalgos->Node->Begin Balance->Content", + "updated": 1611331738675 + }, + { + "style": "Title", + "text": "End Balance", + "updated": 1611331749501 + }, + { + "style": "Include", + "text": "Superalgos->Node->End Balance->Definition", + "updated": 1611331752868 + }, + { + "style": "Include", + "text": "Superalgos->Node->End Balance->Content", + "updated": 1611331756749 + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-011-hits-fails-and-ratios.json b/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-011-hits-fails-and-ratios.json new file mode 100644 index 000000000..d84bc45c6 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-011-hits-fails-and-ratios.json @@ -0,0 +1,61 @@ +{ + "topic": "Trading Engine", + "pageNumber": "11", + "type": "Metrics - Hits, Fails, Hit Ratio, Profit Loss, ROI, Annualized Rate of Return", + "definition": { + "text": "Keep track of the number of hits, fails, and hit ratio, in any given context.", + "updated": 1611331870646 + }, + "paragraphs": [ + { + "style": "Text", + "text": "The number of hits, fails, and their ratios are fundamental metrics.", + "updated": 1611331881268 + }, + { + "style": "Title", + "text": "Hits", + "updated": 1611331909747 + }, + { + "style": "Include", + "text": "Superalgos->Node->Hits->Definition", + "updated": 1611331919409 + }, + { + "style": "Include", + "text": "Superalgos->Node->Hits->Content", + "updated": 1611331922558 + }, + { + "style": "Title", + "text": "Fails", + "updated": 1611331934877 + }, + { + "style": "Include", + "text": "Superalgos->Node->Fails->Definition", + "updated": 1611331939264 + }, + { + "style": "Include", + "text": "Superalgos->Node->Fails->Content", + "updated": 1611331942803 + }, + { + "style": "Title", + "text": "Hit Ratio", + "updated": 1611331974360 + }, + { + "style": "Include", + "text": "Superalgos->Node->Hit Ratio->Definition", + "updated": 1611331977537 + }, + { + "style": "Include", + "text": "Superalgos->Node->Hit Ratio->Content", + "updated": 1611331980968 + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-011-metrics-hits-fails-hit-ratio-profit-loss-roi-annualized rate of return.json b/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-011-metrics-hits-fails-hit-ratio-profit-loss-roi-annualized rate of return.json new file mode 100644 index 000000000..7eb97ddf4 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-011-metrics-hits-fails-hit-ratio-profit-loss-roi-annualized rate of return.json @@ -0,0 +1,106 @@ +{ + "topic": "Trading Engine", + "pageNumber": "11", + "type": "Metrics - Hits, Fails, Hit Ratio, Profit Loss, ROI, Annualized Rate of Return", + "definition": { + "text": "Keep track of the number of hits, fails, and hit ratio, in any given context.", + "updated": 1611331870646 + }, + "paragraphs": [ + { + "style": "Text", + "text": "The number of hits, fails, and their ratios are fundamental metrics.", + "updated": 1611331881268 + }, + { + "style": "Title", + "text": "Hits", + "updated": 1611331909747 + }, + { + "style": "Include", + "text": "Superalgos->Node->Hits->Definition", + "updated": 1611331919409 + }, + { + "style": "Include", + "text": "Superalgos->Node->Hits->Content", + "updated": 1611331922558 + }, + { + "style": "Title", + "text": "Fails", + "updated": 1611331934877 + }, + { + "style": "Include", + "text": "Superalgos->Node->Fails->Definition", + "updated": 1611331939264 + }, + { + "style": "Include", + "text": "Superalgos->Node->Fails->Content", + "updated": 1611331942803 + }, + { + "style": "Title", + "text": "Hit Ratio", + "updated": 1611331974360 + }, + { + "style": "Include", + "text": "Superalgos->Node->Hit Ratio->Definition", + "updated": 1611331977537 + }, + { + "style": "Include", + "text": "Superalgos->Node->Hit Ratio->Content", + "updated": 1611331980968 + }, + { + "style": "Title", + "text": "Profit Loss", + "updated": 1611332640555 + }, + { + "style": "Include", + "text": "Superalgos->Node->Profit Loss->Definition", + "updated": 1611332643604 + }, + { + "style": "Include", + "text": "Superalgos->Node->Profit Loss->Content", + "updated": 1611332647277 + }, + { + "style": "Title", + "text": "ROI", + "updated": 1611332671387 + }, + { + "style": "Include", + "text": "Superalgos->Node->ROI->Definition", + "updated": 1611332674792 + }, + { + "style": "Include", + "text": "Superalgos->Node->ROI->Content", + "updated": 1611332677943 + }, + { + "style": "Title", + "text": "Annualized Rate Of Return", + "updated": 1611332963859 + }, + { + "style": "Include", + "text": "Superalgos->Node->Annualized Rate Of Return->Definition", + "updated": 1611332970973 + }, + { + "style": "Include", + "text": "Superalgos->Node->Annualized Rate Of Return->Content", + "updated": 1611332975434 + } + ] +} \ No newline at end of file