Autonomous
New Member
- Joined
- Apr 30, 2019
- Messages
- 5
I'm struggling with how to write a formula that sorts by individual accounts and dates to calculate drawdown. Any help would be greatly appreciated! I was calculating drawdown by this formula =$A$2:A2/MAX($A$2:A2)-1 but that does not include date and it really needs to be in order. I'm not even sure the formula will always be correct because the date isn't sorted and these are rolling balances and they dont include the date either =SUMIF($A$2:A2,A2,$C$2:C2)+10000. Any help would be appreciated thank you.
[TABLE="class: grid, width: 500"]
<colgroup><col style="mso-width-source:userset;mso-width-alt:2560;width:53pt" width="70"> <col style="width:48pt" width="64" span="2"> <col style="mso-width-source:userset;mso-width-alt:4790;width:98pt" width="131"> <col style="mso-width-source:userset;mso-width-alt:3072;width:63pt" width="84"> <col style="mso-width-source:userset;mso-width-alt:2889;width:59pt" width="79"> </colgroup><tbody>[TR]
[TD="width: 70"][/TD]
[TD="width: 70"]A
[/TD]
[TD="width: 64"]B
[/TD]
[TD="width: 64"]C
[/TD]
[TD="width: 131"]D
[/TD]
[TD="width: 84"]E
[/TD]
[TD="width: 79"]F
[/TD]
[/TR]
[TR]
[TD="width: 70"]1
[/TD]
[TD="width: 70"]Account
[/TD]
[TD="width: 64"]TransDate[/TD]
[TD="width: 64"]TransValue[/TD]
[TD="width: 131"]Balance[/TD]
[TD="width: 84"]Drawdown[/TD]
[TD="width: 79"]Max DD
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]1008
[/TD]
[TD="align: right"]05/06/19[/TD]
[TD="align: right"]2.83[/TD]
[TD="align: right"]10002.83[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]1002[/TD]
[TD="align: right"]05/06/19[/TD]
[TD="align: right"]2.81[/TD]
[TD="align: right"]10002.81[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]1002[/TD]
[TD="align: right"]05/07/19[/TD]
[TD="align: right"]1.19[/TD]
[TD="align: right"]10004[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]1003[/TD]
[TD="align: right"]05/08/19[/TD]
[TD="align: right"]-0.06[/TD]
[TD="align: right"]9999.94[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD]1008[/TD]
[TD="align: right"]05/08/19[/TD]
[TD="align: right"]0.66[/TD]
[TD="align: right"]10003.49[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7
[/TD]
[TD]1006[/TD]
[TD="align: right"]05/09/19[/TD]
[TD="align: right"]-0.24[/TD]
[TD="align: right"]9999.76[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8
[/TD]
[TD]1007[/TD]
[TD="align: right"]05/09/19[/TD]
[TD="align: right"]-4.37[/TD]
[TD="align: right"]9995.63[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9
[/TD]
[TD]1006[/TD]
[TD="align: right"]05/09/19[/TD]
[TD="align: right"]-5.04[/TD]
[TD="align: right"]9994.72[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10
[/TD]
[TD]1008[/TD]
[TD="align: right"]05/09/19[/TD]
[TD="align: right"]-4.87[/TD]
[TD="align: right"]9998.62
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]11
[/TD]
[TD]1003[/TD]
[TD="align: right"]05/10/19[/TD]
[TD="align: right"]3.44[/TD]
[TD="align: right"]10003.38[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: grid, width: 500"]
<colgroup><col style="mso-width-source:userset;mso-width-alt:2560;width:53pt" width="70"> <col style="width:48pt" width="64" span="2"> <col style="mso-width-source:userset;mso-width-alt:4790;width:98pt" width="131"> <col style="mso-width-source:userset;mso-width-alt:3072;width:63pt" width="84"> <col style="mso-width-source:userset;mso-width-alt:2889;width:59pt" width="79"> </colgroup><tbody>[TR]
[TD="width: 70"][/TD]
[TD="width: 70"]A
[/TD]
[TD="width: 64"]B
[/TD]
[TD="width: 64"]C
[/TD]
[TD="width: 131"]D
[/TD]
[TD="width: 84"]E
[/TD]
[TD="width: 79"]F
[/TD]
[/TR]
[TR]
[TD="width: 70"]1
[/TD]
[TD="width: 70"]Account
[/TD]
[TD="width: 64"]TransDate[/TD]
[TD="width: 64"]TransValue[/TD]
[TD="width: 131"]Balance[/TD]
[TD="width: 84"]Drawdown[/TD]
[TD="width: 79"]Max DD
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]1008
[/TD]
[TD="align: right"]05/06/19[/TD]
[TD="align: right"]2.83[/TD]
[TD="align: right"]10002.83[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]1002[/TD]
[TD="align: right"]05/06/19[/TD]
[TD="align: right"]2.81[/TD]
[TD="align: right"]10002.81[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]1002[/TD]
[TD="align: right"]05/07/19[/TD]
[TD="align: right"]1.19[/TD]
[TD="align: right"]10004[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]1003[/TD]
[TD="align: right"]05/08/19[/TD]
[TD="align: right"]-0.06[/TD]
[TD="align: right"]9999.94[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD]1008[/TD]
[TD="align: right"]05/08/19[/TD]
[TD="align: right"]0.66[/TD]
[TD="align: right"]10003.49[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7
[/TD]
[TD]1006[/TD]
[TD="align: right"]05/09/19[/TD]
[TD="align: right"]-0.24[/TD]
[TD="align: right"]9999.76[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8
[/TD]
[TD]1007[/TD]
[TD="align: right"]05/09/19[/TD]
[TD="align: right"]-4.37[/TD]
[TD="align: right"]9995.63[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9
[/TD]
[TD]1006[/TD]
[TD="align: right"]05/09/19[/TD]
[TD="align: right"]-5.04[/TD]
[TD="align: right"]9994.72[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10
[/TD]
[TD]1008[/TD]
[TD="align: right"]05/09/19[/TD]
[TD="align: right"]-4.87[/TD]
[TD="align: right"]9998.62
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]11
[/TD]
[TD]1003[/TD]
[TD="align: right"]05/10/19[/TD]
[TD="align: right"]3.44[/TD]
[TD="align: right"]10003.38[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]