sbenthall / SHARKFin

Simulating Heterogeneous Agents with Finance
6 stars 5 forks source link

Latest error --- ValueError: data type <class 'numpy.object_'> #155

Closed sbenthall closed 1 year ago

sbenthall commented 1 year ago

https://gist.github.com/sbenthall/04b0aea9344d4c6a98a693ab8a8edca9

SIMULATIONS:

- simid: 790

  seed: &seedref790 8060

  rabbitMQHost: &hostref790 10.11.3.4

  rabbitMQqueue: &queueref790 whitesharkqueue790

  ammps_config: &ammpsconfigref790 test_conf.xlsx

  sharkfin:

    save_as: ../../output/whiteshark-babyrunv2790

    parameters:

      simulation: Attention

      tag: tag

      seed: *seedref790

      popn: 25

      quarters: 8

      runs: 60

      attention: 0.99

      dphm: 75000

      market: ClientRPCMarket

      dividend_growth_rate: 1.002

      dividend_std: 0.011988

      queue: *queueref790

      rhost: *hostref790

      p1: 0.99

      p2: 0.95

      d1: 60

      d2: 60

  ammps:

    ammps_config_file_name: *ammpsconfigref790

    ammps_output_dir: ammps_test_out790

    parameters:

      number: 0

      rabbitMQ-host: *hostref790

      rabbitMQ-queue: *queueref790

      t: true

  ammps_config_gen:

    parameters:

      seed: *seedref790

      name: *ammpsconfigref790

      days: 480

      out-dir: /usr/simulation/
Traceback (most recent call last):

  File "/usr/simulation/SHARKFin/simulate/run_any_simulation.py", line 238, in <module>

    data, sim_stats, history, class_stats = run_attention_simulation(

  File "/usr/simulation/SHARKFin/simulate/run_any_simulation.py", line 124, in run_attention_simulation

    return sim.data(), sim.sim_stats(), sim.history, sim.pop.class_stats()

  File "/usr/simulation/SHARKFin/simulate/../sharkfin/simulation.py", line 758, in sim_stats

    sim_stats = super().sim_stats()

  File "/usr/simulation/SHARKFin/simulate/../sharkfin/simulation.py", line 604, in sim_stats

    bs_stats = self.buy_sell_stats()

  File "/usr/simulation/SHARKFin/simulate/../sharkfin/simulation.py", line 261, in buy_sell_stats

    bs_stats['kurtosis_buy_limit'] = stats.kurtosis(buy_limits)

  File "/usr/local/lib/python3.9/site-packages/scipy/stats/_axis_nan_policy.py", line 503, in axis_nan_policy_wrapper

    res = hypotest_fun_out(*samples, **kwds)

  File "/usr/local/lib/python3.9/site-packages/scipy/stats/_stats_py.py", line 1453, in kurtosis

    m2 = _moment(a, 2, axis, mean=mean)

  File "/usr/local/lib/python3.9/site-packages/scipy/stats/_stats_py.py", line 1220, in _moment

    eps = np.finfo(a_zero_mean.dtype).resolution * 10

  File "/usr/local/lib/python3.9/site-packages/numpy/core/getlimits.py", line 474, in __new__

    raise ValueError("data type %r not inexact" % (dtype))

ValueError: data type <class 'numpy.object_'> not inexact

Connection to queue whitesharkqueue798 on 10.11.3.4 closed

Simulation ended