Commit 0e110719 authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent 6f1eaa5d
......@@ -114,6 +114,7 @@ function run(data, config) {
avgAllocatedMoney: maxAllocatedMoney / total,
drawDown: drawDown,
CompoundPerMonthDrawDown:compoundPerMonth/drawDown,
profitPerMonthDrawDown:Math.abs(profitPerMonth)/drawDown,
maxReseve: maxReserve,
avgReserve: maxReserve / total,
percentage: percentage,
......
......@@ -72,7 +72,7 @@ async function run(name, directory, timestamp) {
}
if (name === 'profitPerMonth1000' || name === 'allocatedReservePerMonthUnder3' || name === 'allocatedReservePerMonthUnder2')
last = _.orderBy(arr2, ['profitPerMonth'], ['desc']);
last = _.orderBy(arr2, ['profitPerMonthDrawDown'], ['desc']);
if (name === 'percentage1000')
last = _.orderBy(arr2, ['percentage'], ['asc']);
......
......@@ -72,7 +72,7 @@ async function run(name, directory, timestamp) {
}
if (name === 'profitPerMonth1000' || name === 'allocatedReservePerMonthUnder3' || name === 'allocatedReservePerMonthUnder2')
last = _.orderBy(arr2, ['profitPerMonth'], ['desc']);
last = _.orderBy(arr2, ['profitPerMonthDrawDown'], ['desc']);
if (name === 'percentage1000')
last = _.orderBy(arr2, ['percentage'], ['asc']);
......
......@@ -20,7 +20,7 @@ run()
async function run()
{
let obj={sort:'profitPerMonth',alocatedReserve:3,alocatedReserveCompound:3}
let obj={sort:'profitPerMonthDrawDown',alocatedReserve:3,alocatedReserveCompound:3}
let all=[]
for (let i=0;i<arr.length;i++)
all.push(add(arr[i]))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment