Showing 12 of 12 total issues
Function continuousDrawdown
has a Cognitive Complexity of 22 (exceeds 7 allowed). Consider refactoring. Open
export function continuousDrawdown(x: number[]): number[] {
const cdd = [];
let tmp = 0;
let t = 0;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function mdietz
has a Cognitive Complexity of 15 (exceeds 7 allowed). Consider refactoring. Open
function mdietz(
ev: number,
bv: number,
cf: number | number[],
cfd: number | number[],
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function interp1
has a Cognitive Complexity of 13 (exceeds 7 allowed). Consider refactoring. Open
function interp1(
x: number[],
y: number[],
xnew: number | number[]
): number | number[] {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function drawdown
has a Cognitive Complexity of 13 (exceeds 7 allowed). Consider refactoring. Open
export function drawdown(x: number[], mode = Mode.return) {
let _a;
if (mode === Mode.return) {
_a = cumprod(plus(x, 1));
} else if (mode === Mode.geometric) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function monteCarloValueAtRisk
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
x: number[],
p = 0.95,
t = 1,
fr = 0,
v = 1,
Function m2sortino
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
x: number[],
y: number[],
frisk = 0,
mar = 0,
t: Frequency = Frequency.daily
Function parametricConditionalValueAtRisk
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
mu: number | number[],
sigma: number | number[],
p = 0.95,
amount = 1,
period = 1
Function parametricValueAtRisk
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
mu: number | number[],
sigma: number | number[],
p = 0.95,
amount = 1,
period = 1
Function mdietz
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
ev: number,
bv: number,
cf: number | number[],
cfd: number | number[],
cd: number
Function internalRateOfReturn
has a Cognitive Complexity of 9 (exceeds 7 allowed). Consider refactoring. Open
export const internalRateOfReturn = function (
cf: number[],
cfd?: number[],
cd = 1,
guess = 0.1
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
TODO found Open
// @TODO bug? const "dd" is not used!
- Exclude checks
TODO found Open
// @TODO bug? const "dd" is not used!
- Exclude checks