WU Trading Library 0.2.0
A backtesting and trading strategy library
Loading...
Searching...
No Matches
maxdrawdown.c File Reference
#include <stdlib.h>
#include <math.h>
#include "wu.h"

Go to the source code of this file.

Functions

static double update (WU_MaxDrawdown self, double portfolio_value)
static void wu_max_drawdown_free (WU_MaxDrawdown self)
WU_MaxDrawdown wu_max_drawdown_new (void)
 Creates a new WU_MaxDrawdown indicator.

Function Documentation

◆ update()

double update ( WU_MaxDrawdown self,
double portfolio_value )
static

Definition at line 5 of file maxdrawdown.c.

◆ wu_max_drawdown_free()

void wu_max_drawdown_free ( WU_MaxDrawdown self)
static

Definition at line 16 of file maxdrawdown.c.

◆ wu_max_drawdown_new()

WU_MaxDrawdown wu_max_drawdown_new ( void )

Creates a new WU_MaxDrawdown indicator.

The initial value is set to 0 and the initial peak is set to the first portfolio value observed.

Definition at line 20 of file maxdrawdown.c.