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

init

parent 6f1eaa5d
...@@ -114,6 +114,7 @@ function run(data, config) { ...@@ -114,6 +114,7 @@ function run(data, config) {
avgAllocatedMoney: maxAllocatedMoney / total, avgAllocatedMoney: maxAllocatedMoney / total,
drawDown: drawDown, drawDown: drawDown,
CompoundPerMonthDrawDown:compoundPerMonth/drawDown, CompoundPerMonthDrawDown:compoundPerMonth/drawDown,
profitPerMonthDrawDown:Math.abs(profitPerMonth)/drawDown,
maxReseve: maxReserve, maxReseve: maxReserve,
avgReserve: maxReserve / total, avgReserve: maxReserve / total,
percentage: percentage, percentage: percentage,
......
...@@ -72,7 +72,7 @@ async function run(name, directory, timestamp) { ...@@ -72,7 +72,7 @@ async function run(name, directory, timestamp) {
} }
if (name === 'profitPerMonth1000' || name === 'allocatedReservePerMonthUnder3' || name === 'allocatedReservePerMonthUnder2') if (name === 'profitPerMonth1000' || name === 'allocatedReservePerMonthUnder3' || name === 'allocatedReservePerMonthUnder2')
last = _.orderBy(arr2, ['profitPerMonth'], ['desc']); last = _.orderBy(arr2, ['profitPerMonthDrawDown'], ['desc']);
if (name === 'percentage1000') if (name === 'percentage1000')
last = _.orderBy(arr2, ['percentage'], ['asc']); last = _.orderBy(arr2, ['percentage'], ['asc']);
......
...@@ -72,7 +72,7 @@ async function run(name, directory, timestamp) { ...@@ -72,7 +72,7 @@ async function run(name, directory, timestamp) {
} }
if (name === 'profitPerMonth1000' || name === 'allocatedReservePerMonthUnder3' || name === 'allocatedReservePerMonthUnder2') if (name === 'profitPerMonth1000' || name === 'allocatedReservePerMonthUnder3' || name === 'allocatedReservePerMonthUnder2')
last = _.orderBy(arr2, ['profitPerMonth'], ['desc']); last = _.orderBy(arr2, ['profitPerMonthDrawDown'], ['desc']);
if (name === 'percentage1000') if (name === 'percentage1000')
last = _.orderBy(arr2, ['percentage'], ['asc']); last = _.orderBy(arr2, ['percentage'], ['asc']);
......
...@@ -20,7 +20,7 @@ run() ...@@ -20,7 +20,7 @@ run()
async function run() async function run()
{ {
let obj={sort:'profitPerMonth',alocatedReserve:3,alocatedReserveCompound:3} let obj={sort:'profitPerMonthDrawDown',alocatedReserve:3,alocatedReserveCompound:3}
let all=[] let all=[]
for (let i=0;i<arr.length;i++) for (let i=0;i<arr.length;i++)
all.push(add(arr[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