From 6d78112bc2aa949ed57716fb82fe42d7029a9b9c Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Thu, 21 Jan 2021 19:35:12 +0100 Subject: [PATCH 1/4] Trading Engine Topic WIP --- .../Schemas/Docs-Books/user-manual.json | 16 +++++ ...g-bot-003-data-products-visualization.json | 32 +++++++++ ...g-engine-001-trading-engine-hierarchy.json | 24 +++++++ ...ng-engine-002-monitoring-runtime-data.json | 68 +++++++++++++++++++ ...trading-engine-003-trading-bot-output.json | 28 ++++++++ 5 files changed, 168 insertions(+) create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/low-frequency-trading-bot-003-data-products-visualization.json create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/trading-engine-001-trading-engine-hierarchy.json create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/trading-engine-002-monitoring-runtime-data.json create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/trading-engine-003-trading-bot-output.json diff --git a/Projects/Superalgos/Schemas/Docs-Books/user-manual.json b/Projects/Superalgos/Schemas/Docs-Books/user-manual.json index 67aadeb94..6c4651588 100644 --- a/Projects/Superalgos/Schemas/Docs-Books/user-manual.json +++ b/Projects/Superalgos/Schemas/Docs-Books/user-manual.json @@ -56,6 +56,22 @@ { "style": "Text", "text": "Work in Progress" + }, + { + "style": "Text", + "text": "Work in Progress" + }, + { + "style": "Text", + "text": "Work in Progress" + }, + { + "style": "Text", + "text": "Work in Progress" + }, + { + "style": "Text", + "text": "" } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/low-frequency-trading-bot-003-data-products-visualization.json b/Projects/Superalgos/Schemas/Docs-Topics/low-frequency-trading-bot-003-data-products-visualization.json new file mode 100644 index 000000000..a23fb2308 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/low-frequency-trading-bot-003-data-products-visualization.json @@ -0,0 +1,32 @@ +{ + "topic": "Low-Frequency Trading Bot", + "pageNumber": "3", + "type": "Data Products Visualization", + "definition": { + "text": "The Superalgos trading bot outputs several data products which may be visualized on the frontend application in multiple manners.", + "updated": 1611240250659 + }, + "paragraphs": [ + { + "style": "Text", + "text": "The Low-Frequency trading bot outputs tens of data products, which are made available for others to use through the data structure provided by the Trading Engine hierarchy, the Trading System involved in the trading session, and the time machines installed to visualize the trading simulations.", + "updated": 1611252948830 + }, + { + "style": "Success", + "text": "The Trading Bot Layers interactive tutorial available in the Weak-Hands Buster v.2 plugin workspace covers all the trading bot features that enable the visualization of trading information:" + }, + { + "style": "List", + "text": "Visualization of simulations over the chart for all types of trading sessions." + }, + { + "style": "List", + "text": "Visualization of all the trading information managed by the trading bot on the trading engine hierarchy." + }, + { + "style": "List", + "text": "Visualization of event highlights, values, warnings, errors, and general information concerning the trading system." + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-001-trading-engine-hierarchy.json b/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-001-trading-engine-hierarchy.json new file mode 100644 index 000000000..dbba385f0 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-001-trading-engine-hierarchy.json @@ -0,0 +1,24 @@ +{ + "topic": "Trading Engine", + "pageNumber": "1", + "type": "Trading Engine Hierarchy", + "definition": { + "text": "The trading engine provides a feedback loop to trading systems so that your strategies may leverage the information processed by the trading bot.", + "updated": 1611253515308 + }, + "paragraphs": [ + { + "style": "Include", + "text": "Superalgos->Node->Trading Engine->Definition", + "updated": 1611253576142 + }, + { + "style": "Include", + "text": "Superalgos->Node->Trading Engine->Content" + }, + { + "style": "Success", + "text": "The trading engine hierarchy is deep and large, with many ramifications. It is best to learn it through hands-on experimentation, by testing an existing trading system." + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-002-monitoring-runtime-data.json b/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-002-monitoring-runtime-data.json new file mode 100644 index 000000000..39ea663b5 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-002-monitoring-runtime-data.json @@ -0,0 +1,68 @@ +{ + "topic": "Trading Engine", + "pageNumber": "2", + "type": "Monitoring Runtime Data", + "definition": { + "text": "Use the trading engine hierarchy to track every piece of information processed by the trading bot, candle by candle.", + "updated": 1611253725593 + }, + "paragraphs": [ + { + "style": "Text", + "text": "The trading engine hierarchy is a portal into the trading bot’s machine room—the brain. Think of the trading engine as a terminal connected to each of the brain’s neurons, taking a snapshot for every candle, and registering with precision every piece of data handled by the trading bot during the trading session.", + "updated": 1611253749127 + }, + { + "style": "Text", + "text": "Superalgos combines the time navigation features of the charts with the visual environment representing data structures of the design space, to create an immersive user experience." + }, + { + "style": "Callout", + "text": "Each of the nodes in the hierarchy may display its value on the design space, right below the icon representing the node, for each candle." + }, + { + "style": "Note", + "text": "How users may monitor the information featured in the Trading Engine hierarchy is explained and demonstrated on the Trading Bot Layers tutorial available on the Weak-hands Buster V2.0 plugin workspace.", + "updated": 1611253775463 + }, + { + "style": "Text", + "text": "As a quick refresher, the process is more or less as follows:" + }, + { + "style": "List", + "text": "Run a trading session. Start with a backtest, so that you may get a quick feel of how the Trading Engine hierarchy displays data spanning any period.", + "updated": 1611253817389 + }, + { + "style": "List", + "text": "Go to the chart displaying the simulation and find one of the positions.", + "updated": 1611253824254 + }, + { + "style": "List", + "text": "Turn on the Current Position layer in the Trading Engine layer manager. This layer monitors the position structure of nodes under the current node, that is, the information regarding current positions.", + "updated": 1611253835635 + }, + { + "style": "List", + "text": "Split the screen to make room for both the design space and the charting space.", + "updated": 1611253840769 + }, + { + "style": "List", + "text": "Position the view on the design space so that you may see the corresponding structure of nodes.", + "updated": 1611253852074 + }, + { + "style": "List", + "text": "Slide the pointer of the mouse over the charts, across the position, and notice how the values for each node displayed on the design space change. Each node displays the corresponding value for each candle.", + "updated": 1611253859589 + }, + { + "style": "Success", + "text": "Much of the data handled by the trading engine may also be visualized over the charts through the layers and panels in the Trading Charts layer manager. If any of the above is not clear, please refer to the Trading Bot Layers Tutorial available on the Weak-hands Buster V2.0 plugin workspace.", + "updated": 1611253891479 + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-003-trading-bot-output.json b/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-003-trading-bot-output.json new file mode 100644 index 000000000..09aa872d7 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-003-trading-bot-output.json @@ -0,0 +1,28 @@ +{ + "topic": "Trading Engine", + "pageNumber": "3", + "type": "Trading Bot Output", + "definition": { + "text": "The trading bot stores every piece of information processed in files, making all data accessible to others, both online and offline.", + "updated": 1611254037722 + }, + "paragraphs": [ + { + "style": "Text", + "text": "As explained elsewhere, the trading bot makes the information it processes available to users through the hierarchy of the trading engine, which may be visualized both on the design space and over the charts. It also makes it available to trading systems.", + "updated": 1611254053601 + }, + { + "style": "Text", + "text": "On top of that, the information is also stored in files, sorted by concept. These makes the runtime information available to other processes and external systems, to be accessed both online, that is, at runtime, of offline." + }, + { + "style": "Text", + "text": "The trading bot outputs files on the node it runs on, particularly, in the following location:" + }, + { + "style": "Json", + "text": "Data Storage > [Exchange] > [Market] > Masters-Trading > Low-Frequency > Output > [Session] > Concept > Multi-Period-[Daily/Market] > Time Frame" + } + ] +} \ No newline at end of file From 04d39bb1117f704c79eec52680e9b0c3868e085c Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Thu, 21 Jan 2021 20:17:43 +0100 Subject: [PATCH 2/4] Trading Engine Topic WIP --- .../Docs-Concepts/reusable-snippets.json | 20 +++++ ...004-temporal-context-current-and-last.json | 76 +++++++++++++++++++ 2 files changed, 96 insertions(+) create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/trading-engine-004-temporal-context-current-and-last.json diff --git a/Projects/Superalgos/Schemas/Docs-Concepts/reusable-snippets.json b/Projects/Superalgos/Schemas/Docs-Concepts/reusable-snippets.json index d0f9b82a3..360e27202 100644 --- a/Projects/Superalgos/Schemas/Docs-Concepts/reusable-snippets.json +++ b/Projects/Superalgos/Schemas/Docs-Concepts/reusable-snippets.json @@ -24,6 +24,26 @@ "text": "Dummy", "updated": 1610121260808 }, + { + "style": "Title", + "text": "Note for Hierarchy Tables No Discussion", + "updated": 1611254828783 + }, + { + "style": "Block", + "text": "Note for Hierarchy Tables No Discussion", + "updated": 1611254840023 + }, + { + "style": "Note", + "text": "Click on any of the nodes to get the details, including particulars on their configuration, when applicable.", + "updated": 1611254904577 + }, + { + "style": "Block", + "text": "Dummy", + "updated": 1611254890702 + }, { "style": "Title", "text": "Important for Live Sessions" diff --git a/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-004-temporal-context-current-and-last.json b/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-004-temporal-context-current-and-last.json new file mode 100644 index 000000000..5b221ed57 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-004-temporal-context-current-and-last.json @@ -0,0 +1,76 @@ +{ + "topic": "Trading Engine", + "pageNumber": "4", + "type": "Temporal Context - Current and Last", + "definition": { + "text": "Much of the information provided by the trading engine may be accessed for the current instance of the object as well as for the last instance that was open, at any point in time.", + "updated": 1611254206670 + }, + "paragraphs": [ + { + "style": "Text", + "text": "The trading engine hierarchy is organized by context. That is, the main offspring nodes—current, last, and exchange orders—describe the context in which their respective offspring live.", + "updated": 1611254225764 + }, + { + "style": "Text", + "text": "For example, the concept of an episode—a whole run of the trading bot— exists only in the context of the current episode, as the system keeps track of one episode at the time only." + }, + { + "style": "Text", + "text": "However, the concept of a position is tracked both as the current position and the last position. This is possible because the system keeps track of all positions occurring within an episode." + }, + { + "style": "Callout", + "text": "Superalgos developers thought it was worth it to provide certain information, positions, for example, in both contexts, as this allows you—visually—and your trading system—using simple syntax—to access information about the current position and the last position at any given point in time." + }, + { + "style": "Title", + "text": "Current", + "updated": 1611254496763 + }, + { + "style": "Include", + "text": "Superalgos->Node->Current->Definition", + "updated": 1611254540559 + }, + { + "style": "Include", + "text": "Superalgos->Node->Current->Content" + }, + { + "style": "Include", + "text": "Superalgos->Concept->Reusable Snippets->Note for Hierarchy Tables No Discussion", + "updated": 1611255184563 + }, + { + "style": "Hierarchy", + "text": "Superalgos->Current->2", + "updated": 1611254736085 + }, + { + "style": "Title", + "text": "Last", + "updated": 1611254547170 + }, + { + "style": "Include", + "text": "Superalgos->Node->Last->Definition", + "updated": 1611254556715 + }, + { + "style": "Include", + "text": "Superalgos->Node->Last->Content" + }, + { + "style": "Include", + "text": "Superalgos->Concept->Reusable Snippets->Note for Hierarchy Tables No Discussion", + "updated": 1611255197793 + }, + { + "style": "Hierarchy", + "text": "Superalgos->Last->2", + "updated": 1611255233693 + } + ] +} \ No newline at end of file From ae7022634771790500526443411ac5d3b48c63da Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Thu, 21 Jan 2021 20:54:55 +0100 Subject: [PATCH 3/4] Trading Engine Topic WIP --- ...ode-strategy-position-strategy-stages.json | 239 ++++++++++++++++++ ...ngine-006-base-asset-and-quoted-asset.json | 169 +++++++++++++ 2 files changed, 408 insertions(+) create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/trading-engine-005-temporal-context-episode-strategy-position-strategy-stages.json create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/trading-engine-006-base-asset-and-quoted-asset.json diff --git a/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-005-temporal-context-episode-strategy-position-strategy-stages.json b/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-005-temporal-context-episode-strategy-position-strategy-stages.json new file mode 100644 index 000000000..1cc31ee35 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-005-temporal-context-episode-strategy-position-strategy-stages.json @@ -0,0 +1,239 @@ +{ + "topic": "Trading Engine", + "pageNumber": "5", + "type": "Conceptual Context - Episode, Strategy, Position, Strategy Stages", + "definition": { + "text": "Track the properties within each of the major concepts handled by the trading bot, such as episodes, strategies, positions, strategy stages, and exchange orders.", + "updated": 1611256914210 + }, + "paragraphs": [ + { + "style": "Text", + "text": "Episodes, strategies, positions, strategy stages, exchange orders, and other concepts may be seen as different contexts too, although not of the temporal kind.", + "updated": 1611256927199 + }, + { + "style": "Text", + "text": "For instance, you may want to know what the ROI is in the context of the episode—that is, the ROI after several positions have passed—or the ROI of the current position only." + }, + { + "style": "Callout", + "text": "In other words, many properties such as performance metrics—like ROI, or profit loss—or market data—like the begin and end datetimes or any of these concepts—exist in more than one conceptual context." + }, + { + "style": "Text", + "text": "The following pages describe each of these major conceptual contexts, which, in turn, may exist in more than one temporal context." + }, + { + "style": "Note", + "text": "From the perspective of systems design, each of these concepts is handled as an object that may be open or closed, thus has a lifespan. The same object may be open more than once, but only after the previous instance has been closed.", + "updated": 1611256963378 + }, + { + "style": "Title", + "text": "Episode", + "updated": 1611257045974 + }, + { + "style": "Include", + "text": "Superalgos->Node->Episode->Definition", + "updated": 1611257060021 + }, + { + "style": "Include", + "text": "Superalgos->Node->Episode->Content", + "updated": 1611257063548 + }, + { + "style": "Include", + "text": "Superalgos->Concept->Reusable Snippets->Note for Hierarchy Tables No Discussion" + }, + { + "style": "Hierarchy", + "text": "Superalgos->Episode->2", + "updated": 1611257076886 + }, + { + "style": "Text", + "text": "" + }, + { + "style": "Title", + "text": "Strategy", + "updated": 1611257279919 + }, + { + "style": "Text", + "text": "" + }, + { + "style": "Include", + "text": "Superalgos->Node->Strategy->Definition", + "updated": 1611257297317 + }, + { + "style": "Include", + "text": "Superalgos->Node->Strategy->Content", + "updated": 1611257300492 + }, + { + "style": "Include", + "text": "Superalgos->Concept->Reusable Snippets->Note for Hierarchy Tables No Discussion" + }, + { + "style": "Hierarchy", + "text": "Superalgos->Strategy->2", + "updated": 1611257312551 + }, + { + "style": "Title", + "text": "Position", + "updated": 1611257347308 + }, + { + "style": "Include", + "text": "Superalgos->Node->Position->Definition", + "updated": 1611257358664 + }, + { + "style": "Include", + "text": "Superalgos->Node->Position->Content", + "updated": 1611257362447 + }, + { + "style": "Include", + "text": "Superalgos->Concept->Reusable Snippets->Note for Hierarchy Tables No Discussion" + }, + { + "style": "Hierarchy", + "text": "Superalgos->Position->2", + "updated": 1611257376163 + }, + { + "style": "Title", + "text": "Strategy Stages", + "updated": 1611257433526 + }, + { + "style": "Text", + "text": "The Superalgos Protocol implements a trading framework by which strategies within a trading system are described in stages. The trading bot uses these definitions during runtime.", + "updated": 1611257532139 + }, + { + "style": "Text", + "text": "The concept of strategy stages in the context of the trading engine is an extension of the original concept, useful to keep track of the activity of the trading bot and organize the information processed during runtime." + }, + { + "style": "Text", + "text": "Use these sections of the trading engine if you wish to track exactly what is going on, at a granular level, step by step, from the instant a strategy is triggered until it is closed, with the information segregated by strategy stage." + }, + { + "style": "Callout", + "text": "The exercise may be particularly useful to grasp the intricacies of the workings of the trading bot or to research particular behaviors." + }, + { + "style": "Subtitle", + "text": "Strategy Trigger Stage", + "updated": 1611257553903 + }, + { + "style": "Include", + "text": "Superalgos->Node->Strategy Trigger Stage->Definition", + "updated": 1611257563170 + }, + { + "style": "Include", + "text": "Superalgos->Node->Strategy Trigger Stage->Content", + "updated": 1611257566539 + }, + { + "style": "Include", + "text": "Superalgos->Concept->Reusable Snippets->Note for Hierarchy Tables No Discussion" + }, + { + "style": "Hierarchy", + "text": "Superalgos->Strategy Trigger Stage->2", + "updated": 1611257598667 + }, + { + "style": "Text", + "text": "" + }, + { + "style": "Subtitle", + "text": "Strategy Open Stage", + "updated": 1611257613573 + }, + { + "style": "Include", + "text": "Superalgos->Node->Strategy Open Stage->Definition", + "updated": 1611257617299 + }, + { + "style": "Include", + "text": "Superalgos->Node->Strategy Open Stage->Content", + "updated": 1611257621534 + }, + { + "style": "Include", + "text": "Superalgos->Concept->Reusable Snippets->Note for Hierarchy Tables No Discussion" + }, + { + "style": "Hierarchy", + "text": "Superalgos->Strategy Open Stage->3", + "updated": 1611257686884 + }, + { + "style": "Text", + "text": "" + }, + { + "style": "Subtitle", + "text": "Strategy Manage Stage", + "updated": 1611257655850 + }, + { + "style": "Include", + "text": "Superalgos->Node->Strategy Manage Stage->Definition", + "updated": 1611257660113 + }, + { + "style": "Include", + "text": "Superalgos->Node->Strategy Manage Stage->Content", + "updated": 1611257664015 + }, + { + "style": "Include", + "text": "Superalgos->Concept->Reusable Snippets->Note for Hierarchy Tables No Discussion" + }, + { + "style": "Hierarchy", + "text": "Superalgos->Strategy Manage Stage->2", + "updated": 1611257866068 + }, + { + "style": "Subtitle", + "text": "Strategy Close Stage", + "updated": 1611257705432 + }, + { + "style": "Include", + "text": "Superalgos->Node->Strategy Close Stage->Definition", + "updated": 1611257709416 + }, + { + "style": "Include", + "text": "Superalgos->Node->Strategy Close Stage->Content", + "updated": 1611257713254 + }, + { + "style": "Include", + "text": "Superalgos->Concept->Reusable Snippets->Note for Hierarchy Tables No Discussion" + }, + { + "style": "Hierarchy", + "text": "Superalgos->Strategy Close Stage->3", + "updated": 1611257720858 + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-006-base-asset-and-quoted-asset.json b/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-006-base-asset-and-quoted-asset.json new file mode 100644 index 000000000..24975ce46 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-006-base-asset-and-quoted-asset.json @@ -0,0 +1,169 @@ +{ + "topic": "Trading Engine", + "pageNumber": "6", + "type": "Base Asset and Quoted Asset", + "definition": { + "text": "Keep track of accounts denominated in the base asset and the quoted asset, in multiple contexts. On this page: Episode Base Asset, Episode Quoted Asset, Position Base Asset, Position Quoted Asset, Stage Base Asset, Stage Quoted Asset, Order Base Asset, Order Quoted Asset.", + "updated": 1611258310236 + }, + "paragraphs": [ + { + "style": "Text", + "text": "Because the system aims to be as flexible as possible, the trading engine keeps the accounts relative to both the base asset and the quoted asset. This allows the user to set up the trading system with whatever logic is required and decide which set of accounts suits the intent—the goal—of the trading strategy.", + "updated": 1611258333516 + }, + { + "style": "Callout", + "text": "Notice that—usually—the accounts denominated in one asset will be valid, while the accounts denominated in the other asset will likely make no sense." + }, + { + "style": "Text", + "text": "Which set of accounts you will monitor to track the performance of the episode depends on how you define your trading system." + }, + { + "style": "Text", + "text": "For example, If you are trading the BTC/USDT market and developed a trading system to accumulate USDT, then the set of accounts that will make sense for you is the one denominated in the quoted asset, that is, in USDT. This is why:" + }, + { + "style": "Text", + "text": "Your strategy will likely buy BTC (the base asset) expecting the price to go up while the position is open, in order to sell BTC at a higher rate and end up with more USDT (the quoted asset) than you started with." + }, + { + "style": "Title", + "text": "Example", + "updated": 1611258412121 + }, + { + "style": "Text", + "text": "Let’s say you buy 10,000 USDT worth of BTC. BTC price increases by 10%, so you sell the whole amount of BTC to close the position and end up with 10,900 USDT (exchange fees are deducted from the balance)." + }, + { + "style": "Text", + "text": "In terms of the base asset, your begin balance is 0 BTC and your end balance is 0.00000012 BTC, as the exchange left some BTC dust in the account due to rate conversion limitations. Also in terms of the base asset, your profit loss for the position is...", + "updated": 1611258453118 + }, + { + "style": "Text", + "text": "" + }, + { + "style": "Json", + "text": "0.00000012 BTC - 0 BTC = 0.00000012 BTC", + "updated": 1611258465358 + }, + { + "style": "Text", + "text": "ROI and other metrics may be derived from these initial observations as well. Needless to say, such metrics are irrelevant to the intent of the strategy, which is to accumulate USDT." + }, + { + "style": "Text", + "text": "Now, in terms of the base asset, your begin balance is 10,000 USDT and your end balance is 10,900 USDT (exchange fees are deducted from the balance). Also in terms of the quoted asset, your profit loss for the position is...", + "updated": 1611258484205 + }, + { + "style": "Json", + "text": "10,900 USDT - 10,000 USDT = 900 USDT" + }, + { + "style": "Text", + "text": "It should be clear by now that these are the metrics relevant to the intent of the strategy." + }, + { + "style": "Note", + "text": "With other types of strategies, for example, those in which the intent is to accumulate both assets, both sets of metrics may be relevant. Also, the consolidated metrics provided in the context of statistics may be relevant too.", + "updated": 1611258499505 + }, + { + "style": "Text", + "text": "The concepts relative to base and quoted asset, such as the balance of each asset and the performance metrics computed from the perspective of each asset, are tracked in multiple contexts simultaneously." + }, + { + "style": "Text", + "text": "What follows are the definitions of the base and quoted asset in each of the contexts that the concepts are tracked." + }, + { + "style": "Title", + "text": "Episode Base Asset", + "updated": 1611258577948 + }, + { + "style": "Include", + "text": "Superalgos->Node->Episode Base Asset->Definition", + "updated": 1611258580907 + }, + { + "style": "Title", + "text": "Episode Quoted Asset", + "updated": 1611258588997 + }, + { + "style": "Include", + "text": "Superalgos->Node->Episode Quoted Asset->Definition", + "updated": 1611258592849 + }, + { + "style": "Title", + "text": "Position Base Asset", + "updated": 1611258602952 + }, + { + "style": "Include", + "text": "Superalgos->Node->Position Base Asset->Definition", + "updated": 1611258605932 + }, + { + "style": "Title", + "text": "Position Quoted Asset", + "updated": 1611258616805 + }, + { + "style": "Include", + "text": "Superalgos->Node->Position Quoted Asset->Definition", + "updated": 1611258619810 + }, + { + "style": "Title", + "text": "Stage Base Asset", + "updated": 1611258630368 + }, + { + "style": "Include", + "text": "Superalgos->Node->Stage Base Asset->Definition", + "updated": 1611258633312 + }, + { + "style": "Title", + "text": "Stage Quoted Asset", + "updated": 1611258644044 + }, + { + "style": "Include", + "text": "Superalgos->Node->Stage Quoted Asset->Definition", + "updated": 1611258647352 + }, + { + "style": "Title", + "text": "Order Base Asset", + "updated": 1611258657391 + }, + { + "style": "Include", + "text": "Superalgos->Node->Order Base Asset->Definition", + "updated": 1611258660759 + }, + { + "style": "Title", + "text": "Order Quoted Asset", + "updated": 1611258669352 + }, + { + "style": "Include", + "text": "Superalgos->Node->Order Quoted Asset->Definition", + "updated": 1611258672239 + }, + { + "style": "Text", + "text": "" + } + ] +} \ No newline at end of file From 8f3b6aa7e9a77e2804b39ac31b95677e21679be2 Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Thu, 21 Jan 2021 21:30:08 +0100 Subject: [PATCH 4/4] Trading Engine Topic WIP --- .../Schemas/Docs-Books/user-manual.json | 7 +- .../trading-engine-007-counters.json | 171 ++++++++++++++++++ .../trading-engine-008-statistics.json | 77 ++++++++ 3 files changed, 254 insertions(+), 1 deletion(-) create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/trading-engine-007-counters.json create mode 100644 Projects/Superalgos/Schemas/Docs-Topics/trading-engine-008-statistics.json diff --git a/Projects/Superalgos/Schemas/Docs-Books/user-manual.json b/Projects/Superalgos/Schemas/Docs-Books/user-manual.json index 6c4651588..fe3e608d2 100644 --- a/Projects/Superalgos/Schemas/Docs-Books/user-manual.json +++ b/Projects/Superalgos/Schemas/Docs-Books/user-manual.json @@ -49,9 +49,14 @@ "style": "Text", "text": "" }, + { + "style": "Chapter", + "text": "IX->Superalgos->Topic->Trading Engine->The trading engine is about making the data processed by the Trading Bot accessible. Use it while debugging strategies to visually track every piece of information processed by the trading bot at any point in time. Use it from within trading systems to feed strategies with the details of what happens at runtime.", + "updated": 1611260954268 + }, { "style": "Text", - "text": "Work in Progress" + "text": "" }, { "style": "Text", diff --git a/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-007-counters.json b/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-007-counters.json new file mode 100644 index 000000000..5e64b9baf --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-007-counters.json @@ -0,0 +1,171 @@ +{ + "topic": "Trading Engine", + "pageNumber": "7", + "type": "Counters", + "definition": { + "text": "Keep track of how many instances of certain objects have existed in a given context. On this page: Periods, Strategies, Positions, Orders, and Days.", + "updated": 1611259332958 + }, + "paragraphs": [ + { + "style": "Text", + "text": "A counter keeps track of how many instances of certain objects have come to exist—or have taken a certain value—during the duration of a certain context.", + "updated": 1611259349617 + }, + { + "style": "Text", + "text": "For example, how many positions have been open during an episode, or how many of those positions have been hits." + }, + { + "style": "Text", + "text": "Counters are kept in multiple contexts simultaneously. In particular, you will find episode counters, strategy counters, position counters, and order counters." + }, + { + "style": "Text", + "text": "" + }, + { + "style": "Title", + "text": "Counter-specific Nodes" + }, + { + "style": "Subtitle", + "text": "Periods", + "updated": 1611259406618 + }, + { + "style": "Include", + "text": "Superalgos->Node->Periods->Definition", + "updated": 1611259409668 + }, + { + "style": "Subtitle", + "text": "Strategies", + "updated": 1611259416144 + }, + { + "style": "Include", + "text": "Superalgos->Node->Strategies->Definition", + "updated": 1611259419177 + }, + { + "style": "Subtitle", + "text": "Positions", + "updated": 1611259428759 + }, + { + "style": "Include", + "text": "Superalgos->Node->Positions->Definition", + "updated": 1611259431976 + }, + { + "style": "Subtitle", + "text": "Orders", + "updated": 1611259442020 + }, + { + "style": "Include", + "text": "Superalgos->Node->Orders->Definition", + "updated": 1611259444724 + }, + { + "style": "Subtitle", + "text": "Days", + "updated": 1611259453496 + }, + { + "style": "Include", + "text": "Superalgos->Node->Days->Definition", + "updated": 1611259459728 + }, + { + "style": "Include", + "text": "Superalgos->Node->Days->Content", + "updated": 1611259823914 + }, + { + "style": "Text", + "text": "" + }, + { + "style": "Note", + "text": "Other properties typical to counters are defined elsewhere, as they are not specific to counters. Find below the different contexts in which counters are found.", + "updated": 1611259860203 + }, + { + "style": "Title", + "text": "Episode Counters", + "updated": 1611260075956 + }, + { + "style": "Include", + "text": "Superalgos->Node->Episode Counters->Definition", + "updated": 1611260079244 + }, + { + "style": "Include", + "text": "Superalgos->Concept->Reusable Snippets->Note for Hierarchy Tables No Discussion" + }, + { + "style": "Hierarchy", + "text": "Superalgos->Episode Counters->2", + "updated": 1611260082549 + }, + { + "style": "Title", + "text": "Strategy Counters" + }, + { + "style": "Include", + "text": "Superalgos->Node->Strategy Counters->Definition", + "updated": 1611259923717 + }, + { + "style": "Include", + "text": "Superalgos->Concept->Reusable Snippets->Note for Hierarchy Tables No Discussion" + }, + { + "style": "Hierarchy", + "text": "Superalgos->Strategy Counters->2", + "updated": 1611259927606 + }, + { + "style": "Title", + "text": "Position Counters", + "updated": 1611259936812 + }, + { + "style": "Include", + "text": "Superalgos->Node->Position Counters->Definition", + "updated": 1611259939595 + }, + { + "style": "Include", + "text": "Superalgos->Concept->Reusable Snippets->Note for Hierarchy Tables No Discussion" + }, + { + "style": "Hierarchy", + "text": "Superalgos->Position Counters->2", + "updated": 1611259944892 + }, + { + "style": "Title", + "text": "Order Counters", + "updated": 1611259959379 + }, + { + "style": "Include", + "text": "Superalgos->Node->Order Counters->Definition", + "updated": 1611259963832 + }, + { + "style": "Include", + "text": "Superalgos->Concept->Reusable Snippets->Note for Hierarchy Tables No Discussion" + }, + { + "style": "Hierarchy", + "text": "Superalgos->Order Counters->2", + "updated": 1611259967561 + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-008-statistics.json b/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-008-statistics.json new file mode 100644 index 000000000..429c0932d --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/trading-engine-008-statistics.json @@ -0,0 +1,77 @@ +{ + "topic": "Trading Engine", + "pageNumber": "8", + "type": "Statistics", + "definition": { + "text": "Track popular statistics consolidating both the base asset and the quoted asset. On this page: Episode Statistics, Position Statistics, and Order Statistics.", + "updated": 1611260196449 + }, + "paragraphs": [ + { + "style": "Text", + "text": "Statistics are accounts and performance metrics calculated by consolidating the base asset and the quoted asset, that is, taking both assets into account.", + "updated": 1611260210428 + }, + { + "style": "Text", + "text": "The mechanics of how both assets are consolidated and how the consolidation affects the calculations are explained in the definitions of each of the concepts." + }, + { + "style": "Title", + "text": "Episode Statistics", + "updated": 1611260256691 + }, + { + "style": "Include", + "text": "Superalgos->Node->Episode Statistics->Definition", + "updated": 1611260259469 + }, + { + "style": "Include", + "text": "Superalgos->Concept->Reusable Snippets->Note for Hierarchy Tables No Discussion" + }, + { + "style": "Hierarchy", + "text": "Superalgos->Episode Statistics->2", + "updated": 1611260262273 + }, + { + "style": "Title", + "text": "Position Statistics", + "updated": 1611260273697 + }, + { + "style": "Include", + "text": "Superalgos->Node->Position Statistics->Definition", + "updated": 1611260277415 + }, + { + "style": "Include", + "text": "Superalgos->Concept->Reusable Snippets->Note for Hierarchy Tables No Discussion" + }, + { + "style": "Hierarchy", + "text": "Superalgos->Position Statistics->2", + "updated": 1611260280519 + }, + { + "style": "Title", + "text": "Order Statistics", + "updated": 1611260292859 + }, + { + "style": "Include", + "text": "Superalgos->Node->Order Statistics->Definition", + "updated": 1611260295959 + }, + { + "style": "Include", + "text": "Superalgos->Concept->Reusable Snippets->Note for Hierarchy Tables No Discussion" + }, + { + "style": "Hierarchy", + "text": "Superalgos->Order Statistics->2", + "updated": 1611260299229 + } + ] +} \ No newline at end of file