Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8941317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:16:21+00:00 2026-06-15T11:16:21+00:00

In R, I see there are two packages that have a maxdrawdown function. One

  • 0

In R, I see there are two packages that have a maxdrawdown function.

One is fTrading and the other is PerformaceAnalytics.

Each of those does a different calculation.

  1. fTrading seems to make the assumption that the values are prices of an asset so the drawdown is in valuation.
  2. The same applies to PerformanceAnalytics except it gives the answer as a percentage.

Is there a package with a maxdrawdown function that expects P/L data in a series and gives the draw down based on that?

e.g if you had the following data

c(12,10,5,-4,-2,1,5,6)

The max drawdown would be :

-4 + -2=-6.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T11:16:22+00:00Added an answer on June 15, 2026 at 11:16 am

    You’re trying to find the maxDrawDown of the cumsum of PnL (which is the same as the account value).

    > library(fTrading)
    > maxDrawDown(cumsum(c(0, c(12,10,5,-4,-2,1,5,6))))
    $maxdrawdown
    [1] 6
    
    $from
    [1] 3
    
    $to
    [1] 5
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one package that calls two other child packages. All three packages have
I have following fiddle: http://jsfiddle.net/BFSH4/ As you see there are two issues: The h1
first of all, i like to say that i have read the other two
I have created two actions in code, one simple and one advanced. function userbeep_action_info()
As I see it there are two different types of logging: User-focused logs, like
table user: |id|name|employee_priority_id|user_priority_id| table priority: |id|name| As you can see, there are two foreign
When I concatenate the following two unicode characters I see both but there is
Is there a best (see below) way to append two byte arrays in C#?
I have been coming across these two words more often but i didn't see
I have a running JVM with two threads. Is it possible to see these

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.