Machine Learning Project extracted from Foundations
This commit is contained in:
1 parent
2837f0ab32
commit
9e5c550474
13 files changed
+112
-98
No files matched your search
@@ -590,22 +590,22 @@ function newFoundationsActionSwitch() {
|
||||
break
|
||||
case 'Stop Trading Session':
|
||||
{
|
||||
UI.projects.foundations.functionLibraries.tradingSessionFunctions.stopSession(action.node, action.callBackFunction)
|
||||
UI.projects.algorithmicTrading.functionLibraries.tradingSessionFunctions.stopSession(action.node, action.callBackFunction)
|
||||
}
|
||||
break
|
||||
case 'Run Learning Session':
|
||||
{
|
||||
UI.projects.foundations.functionLibraries.learningSessionFunctions.runSession(action.node, false, action.callBackFunction)
|
||||
UI.projects.machineLearning.functionLibraries.learningSessionFunctions.runSession(action.node, false, action.callBackFunction)
|
||||
}
|
||||
break
|
||||
case 'Resume Learning Session':
|
||||
{
|
||||
UI.projects.foundations.functionLibraries.learningSessionFunctions.runSession(action.node, true, action.callBackFunction)
|
||||
UI.projects.machineLearning.functionLibraries.learningSessionFunctions.runSession(action.node, true, action.callBackFunction)
|
||||
}
|
||||
break
|
||||
case 'Stop Learning Session':
|
||||
{
|
||||
UI.projects.foundations.functionLibraries.learningSessionFunctions.stopSession(action.node, action.callBackFunction)
|
||||
UI.projects.machineLearning.functionLibraries.learningSessionFunctions.stopSession(action.node, action.callBackFunction)
|
||||
}
|
||||
break
|
||||
case 'Run Super Action':
|
||||
|
||||
@@ -278,7 +278,7 @@ function newFoundationsFunctionLibraryUiObjectsFromNodes() {
|
||||
function syncronizeLearningSessionsFoundAtWorkspaceWithBackEnd() {
|
||||
for (let i = 0; i < learningSessionsFoundAtWorkspace.length; i++) {
|
||||
let node = learningSessionsFoundAtWorkspace[i]
|
||||
UI.projects.algorithmicTrading.functionLibraries.tradingSessionFunctions.syncronizeSessionWithBackEnd(node)
|
||||
UI.projects.machineLearning.functionLibraries.learningSessionFunctions.syncronizeSessionWithBackEnd(node)
|
||||
}
|
||||
learningSessionsFoundAtWorkspace = undefined
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
exports.newFoundationsBotModulesLearningSession = function (processIndex) {
|
||||
exports.newMachineLearningBotModulesLearningSession = function (processIndex) {
|
||||
|
||||
const MODULE_NAME = "Learning Session"
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
exports.newFoundationsBotModulesLearningEngine = function (processIndex) {
|
||||
exports.newMachineLearningBotModulesLearningEngine = function (processIndex) {
|
||||
/*
|
||||
We call the Learning Engine to the data structure that is needed in order to exevute the
|
||||
learning protocol with the specific rules defined at the Learning System.
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
exports.newFoundationsBotModulesLearningEpisode = function (processIndex) {
|
||||
exports.newMachineLearningBotModulesLearningEpisode = function (processIndex) {
|
||||
/*
|
||||
This module packages all functions related to Episodes.
|
||||
*/
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
exports.newFoundationsBotModulesLearningOutput = function (processIndex) {
|
||||
exports.newMachineLearningBotModulesLearningOutput = function (processIndex) {
|
||||
/*
|
||||
This module will load if necesary all the data outputs so that they can be appended with new
|
||||
records if needed. After running the simulation, it will save all the data outputs.
|
||||
@@ -29,7 +29,7 @@ exports.newFoundationsBotModulesLearningOutput = function (processIndex) {
|
||||
}
|
||||
|
||||
/* Preparing everything for the Simulation */
|
||||
let learningSimulationModuleObject = TS.projects.foundations.botModules.learningSimulation.newFoundationsBotModulesLearningSimulation(processIndex)
|
||||
let learningSimulationModuleObject = TS.projects.foundations.botModules.learningSimulation.newMachineLearningBotModulesLearningSimulation(processIndex)
|
||||
|
||||
let outputDatasets = TS.projects.foundations.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput, 'Output Dataset')
|
||||
let outputDatasetsMap = new Map()
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
exports.newFoundationsBotModulesLearningProcess = function (processIndex) {
|
||||
exports.newMachineLearningBotModulesLearningProcess = function (processIndex) {
|
||||
/*
|
||||
This Module will load all the process data dependencies from files and send them downstream.
|
||||
After execution, will save the time range and status report of the process.
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
let dataFiles = new Map()
|
||||
let multiTimeFrameDataFiles = new Map()
|
||||
TS.projects.foundations.globals.processModuleObjects.MODULE_OBJECTS_BY_PROCESS_INDEX_MAP.get(processIndex).LEARNING_ENGINE_MODULE_OBJECT = TS.projects.foundations.botModules.learningEngine.newFoundationsBotModulesLearningEngine(processIndex)
|
||||
let learningOutputModuleObject = TS.projects.foundations.botModules.learningOutput.newFoundationsBotModulesLearningOutput(processIndex)
|
||||
TS.projects.foundations.globals.processModuleObjects.MODULE_OBJECTS_BY_PROCESS_INDEX_MAP.get(processIndex).LEARNING_ENGINE_MODULE_OBJECT = TS.projects.foundations.botModules.learningEngine.newMachineLearningBotModulesLearningEngine(processIndex)
|
||||
let learningOutputModuleObject = TS.projects.foundations.botModules.learningOutput.newMachineLearningBotModulesLearningOutput(processIndex)
|
||||
|
||||
let currentTimeFrame = {}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
exports.newFoundationsBotModulesLearningRecords = function (processIndex) {
|
||||
exports.newMachineLearningBotModulesLearningRecords = function (processIndex) {
|
||||
/*
|
||||
This module facilitates the appending of records to the output of the process.
|
||||
*/
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
exports.newFoundationsBotModulesLearningSimulation = function (processIndex) {
|
||||
exports.newMachineLearningBotModulesLearningSimulation = function (processIndex) {
|
||||
/*
|
||||
This Module represents the learning simulation. Essentially a loop through a set of candles and
|
||||
the execution at each loop cycle of the Learning System Protocol.
|
||||
@@ -33,10 +33,10 @@ exports.newFoundationsBotModulesLearningSimulation = function (processIndex) {
|
||||
'[INFO] runSimulation -> finalDatetime = ' + sessionParameters.timeRange.config.finalDatetime)
|
||||
|
||||
/* These are the Modules we will need to run the Simulation */
|
||||
let learningRecordsModuleObject = TS.projects.foundations.botModules.learningRecords.newFoundationsBotModulesLearningRecords(processIndex)
|
||||
let learningRecordsModuleObject = TS.projects.foundations.botModules.learningRecords.newMachineLearningBotModulesLearningRecords(processIndex)
|
||||
learningRecordsModuleObject.initialize(outputDatasetsMap)
|
||||
|
||||
let learningSystemModuleObject = TS.projects.foundations.botModules.learningSystem.newFoundationsBotModulesLearningSystem(processIndex)
|
||||
let learningSystemModuleObject = TS.projects.foundations.botModules.learningSystem.newMachineLearningBotModulesLearningSystem(processIndex)
|
||||
learningSystemModuleObject.initialize()
|
||||
|
||||
/*
|
||||
@@ -77,7 +77,7 @@ exports.newFoundationsBotModulesLearningSimulation = function (processIndex) {
|
||||
}
|
||||
}
|
||||
|
||||
let learningEpisodeModuleObject = TS.projects.foundations.botModules.learningEpisode.newFoundationsBotModulesLearningEpisode(processIndex)
|
||||
let learningEpisodeModuleObject = TS.projects.foundations.botModules.learningEpisode.newMachineLearningBotModulesLearningEpisode(processIndex)
|
||||
learningEpisodeModuleObject.initialize()
|
||||
|
||||
/* Setting up the candles array: The whole simulation is based on the array of candles at the time-frame defined at the session parameters. */
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
exports.newFoundationsBotModulesLearningSystem = function (processIndex) {
|
||||
exports.newMachineLearningBotModulesLearningSystem = function (processIndex) {
|
||||
/*
|
||||
The Learning System is the user defined set of rules compliant with the Learning Protocol that
|
||||
defines the learning logic to be applied during each cycle of the Simulation.
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
exports.newFoundationsBotModulesSingleMarketLearningBot = function (processIndex) {
|
||||
exports.newMachineLearningBotModulesSingleMarketLearningBot = function (processIndex) {
|
||||
|
||||
const MODULE_NAME = "Single Market Learning Bot";
|
||||
|
||||
let session = TS.projects.foundations.botModules.learningSession.newFoundationsBotModulesLearningSession(processIndex)
|
||||
let session = TS.projects.foundations.botModules.learningSession.newMachineLearningBotModulesLearningSession(processIndex)
|
||||
let nextLoopTimeoutHandle;
|
||||
|
||||
let thisObject = {
|
||||
@@ -282,7 +282,7 @@
|
||||
"[INFO] run -> loop -> initializeDataDependencies -> onInizialized -> Execution finished well.")
|
||||
switch (TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.config.framework.name) {
|
||||
case 'Low-Frequency-Learning-Process': {
|
||||
processFramework = TS.projects.foundations.botModules.learningProcess.newFoundationsBotModulesLearningProcess(processIndex);
|
||||
processFramework = TS.projects.foundations.botModules.learningProcess.newMachineLearningBotModulesLearningProcess(processIndex);
|
||||
startProcessFramework();
|
||||
break;
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
function newFoundationsFunctionLibraryLearningSessionFunctions() {
|
||||
function newMachineLearningFunctionLibraryLearningSessionFunctions() {
|
||||
let thisObject = {
|
||||
syncronizeSessionWithBackEnd: syncronizeSessionWithBackEnd,
|
||||
runSession: runSession,
|
||||
@@ -151,6 +151,95 @@
|
||||
"Trading Tasks"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Machine-Learning",
|
||||
"propertyName": "machineLearning",
|
||||
"UI": {
|
||||
"functionLibraries": [
|
||||
{
|
||||
"name": "Learning Session Functions",
|
||||
"propertyName": "learningSessionFunctions",
|
||||
"functionName": "newMachineLearningFunctionLibraryLearningSessionFunctions"
|
||||
}
|
||||
]
|
||||
},
|
||||
"TS": {
|
||||
"botModules": [
|
||||
{
|
||||
"name": "Single Market Learning Bot",
|
||||
"propertyName": "singleMarketLearningBot",
|
||||
"functionName": "newMachineLearningBotModulesSingleMarketLearningBot",
|
||||
"fileName": "SingleMarketLearningBot.js",
|
||||
"folderName": "Learning-Bot",
|
||||
"botType": "Learning Bot"
|
||||
},
|
||||
{
|
||||
"name": "Learning Session",
|
||||
"propertyName": "learningSession",
|
||||
"functionName": "newMachineLearningBotModulesLearningSession",
|
||||
"fileName": "LearningSession.js",
|
||||
"folderName": "Learning-Bot"
|
||||
},
|
||||
{
|
||||
"name": "Learning Process",
|
||||
"propertyName": "learningProcess",
|
||||
"functionName": "newMachineLearningBotModulesLearningProcess",
|
||||
"fileName": "LearningProcess.js",
|
||||
"folderName": "Learning-Bot/Low-Frequency-Learning"
|
||||
},
|
||||
{
|
||||
"name": "Learning Engine",
|
||||
"propertyName": "learningEngine",
|
||||
"functionName": "newMachineLearningBotModulesLearningEngine",
|
||||
"fileName": "LearningEngine.js",
|
||||
"folderName": "Learning-Bot/Low-Frequency-Learning"
|
||||
},
|
||||
{
|
||||
"name": "Learning Output",
|
||||
"propertyName": "learningOutput",
|
||||
"functionName": "newMachineLearningBotModulesLearningOutput",
|
||||
"fileName": "LearningOutput.js",
|
||||
"folderName": "Learning-Bot/Low-Frequency-Learning"
|
||||
},
|
||||
{
|
||||
"name": "Learning Simulation",
|
||||
"propertyName": "learningSimulation",
|
||||
"functionName": "newMachineLearningBotModulesLearningSimulation",
|
||||
"fileName": "LearningSimulation.js",
|
||||
"folderName": "Learning-Bot/Low-Frequency-Learning"
|
||||
},
|
||||
{
|
||||
"name": "Learning Episode",
|
||||
"propertyName": "learningEpisode",
|
||||
"functionName": "newMachineLearningBotModulesLearningEpisode",
|
||||
"fileName": "LearningEpisode.js",
|
||||
"folderName": "Learning-Bot/Low-Frequency-Learning"
|
||||
},
|
||||
{
|
||||
"name": "Learning Records",
|
||||
"propertyName": "learningRecords",
|
||||
"functionName": "newMachineLearningBotModulesLearningRecords",
|
||||
"fileName": "LearningRecords.js",
|
||||
"folderName": "Learning-Bot/Low-Frequency-Learning"
|
||||
},
|
||||
{
|
||||
"name": "Learning System",
|
||||
"propertyName": "learningSystem",
|
||||
"functionName": "newMachineLearningBotModulesLearningSystem",
|
||||
"fileName": "LearningSystem.js",
|
||||
"folderName": "Learning-Bot/Low-Frequency-Learning"
|
||||
}
|
||||
]
|
||||
},
|
||||
"plugins": [
|
||||
"Learning Mines",
|
||||
"Learning Systems",
|
||||
"Learning Engines"
|
||||
],
|
||||
"tasks": [
|
||||
"Learning Tasks"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Foundations",
|
||||
"propertyName": "foundations",
|
||||
@@ -223,11 +312,6 @@
|
||||
"propertyName": "taskFunctions",
|
||||
"functionName": "newFoundationsFunctionLibraryTaskFunctions"
|
||||
},
|
||||
{
|
||||
"name": "Learning Session Functions",
|
||||
"propertyName": "learningSessionFunctions",
|
||||
"functionName": "newFoundationsFunctionLibraryLearningSessionFunctions"
|
||||
},
|
||||
{
|
||||
"name": "Crypto Ecosystem Functions",
|
||||
"propertyName": "cryptoEcosystemFunctions",
|
||||
@@ -690,70 +774,6 @@
|
||||
"functionName": "newFoundationsBotModulesSlackBot",
|
||||
"fileName": "SlackBot.js",
|
||||
"folderName": "Trading-Bot/Announcements"
|
||||
},
|
||||
{
|
||||
"name": "Single Market Learning Bot",
|
||||
"propertyName": "singleMarketLearningBot",
|
||||
"functionName": "newFoundationsBotModulesSingleMarketLearningBot",
|
||||
"fileName": "SingleMarketLearningBot.js",
|
||||
"folderName": "Learning-Bot",
|
||||
"botType": "Learning Bot"
|
||||
},
|
||||
{
|
||||
"name": "Learning Session",
|
||||
"propertyName": "learningSession",
|
||||
"functionName": "newFoundationsBotModulesLearningSession",
|
||||
"fileName": "LearningSession.js",
|
||||
"folderName": "Learning-Bot"
|
||||
},
|
||||
{
|
||||
"name": "Learning Process",
|
||||
"propertyName": "learningProcess",
|
||||
"functionName": "newFoundationsBotModulesLearningProcess",
|
||||
"fileName": "LearningProcess.js",
|
||||
"folderName": "Learning-Bot/Low-Frequency-Learning"
|
||||
},
|
||||
{
|
||||
"name": "Learning Engine",
|
||||
"propertyName": "learningEngine",
|
||||
"functionName": "newFoundationsBotModulesLearningEngine",
|
||||
"fileName": "LearningEngine.js",
|
||||
"folderName": "Learning-Bot/Low-Frequency-Learning"
|
||||
},
|
||||
{
|
||||
"name": "Learning Output",
|
||||
"propertyName": "learningOutput",
|
||||
"functionName": "newFoundationsBotModulesLearningOutput",
|
||||
"fileName": "LearningOutput.js",
|
||||
"folderName": "Learning-Bot/Low-Frequency-Learning"
|
||||
},
|
||||
{
|
||||
"name": "Learning Simulation",
|
||||
"propertyName": "learningSimulation",
|
||||
"functionName": "newFoundationsBotModulesLearningSimulation",
|
||||
"fileName": "LearningSimulation.js",
|
||||
"folderName": "Learning-Bot/Low-Frequency-Learning"
|
||||
},
|
||||
{
|
||||
"name": "Learning Episode",
|
||||
"propertyName": "learningEpisode",
|
||||
"functionName": "newFoundationsBotModulesLearningEpisode",
|
||||
"fileName": "LearningEpisode.js",
|
||||
"folderName": "Learning-Bot/Low-Frequency-Learning"
|
||||
},
|
||||
{
|
||||
"name": "Learning Records",
|
||||
"propertyName": "learningRecords",
|
||||
"functionName": "newFoundationsBotModulesLearningRecords",
|
||||
"fileName": "LearningRecords.js",
|
||||
"folderName": "Learning-Bot/Low-Frequency-Learning"
|
||||
},
|
||||
{
|
||||
"name": "Learning System",
|
||||
"propertyName": "learningSystem",
|
||||
"functionName": "newFoundationsBotModulesLearningSystem",
|
||||
"fileName": "LearningSystem.js",
|
||||
"folderName": "Learning-Bot/Low-Frequency-Learning"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -810,14 +830,8 @@
|
||||
]
|
||||
},
|
||||
"plugins": [
|
||||
"Learning Mines",
|
||||
"Learning Systems",
|
||||
"Learning Engines",
|
||||
"Tutorials",
|
||||
"API Maps"
|
||||
],
|
||||
"tasks": [
|
||||
"Learning Tasks"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user