寻找局部极小值

问题描述

我正在做BVA-关于动量的函数,我必须找到局部最小值并宣布市场泡沫。任何人都可以纠正此代码,因为它无法正常工作。

'Going through loop to find local minimum
 For i = 1 To run_momentum Step step_size
    'If
    If Momentum(i,1) < small_nums(i,1) Then
        'WOwee! If its smaller than the smallest one as well we better remember that
        If Momentum(i,1) < small_nums(i - 1,1) Then
            'Commence remember.exe  of LIL NUMBERS
            small_lil_nums(2,1) = small_lil_nums(1,1)
            small_lil_nums(2,2) = small_lil_nums(1,2)
            'Smol number still loading...
            small_lil_nums(1,1) = Momentum(i,1)
        small_lil_nums(1,2) = i
        Else ' That numbers not quite super small but it is still pretty small so I guess ill remember it
        small_lil_nums(2,1)
        small_lil_nums(2,2) = i
        End If
    End If
Next i

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)