Qubx 0.0.1__cp311-cp311-manylinux_2_35_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of Qubx might be problematic. Click here for more details.

qubx/core/series.pxd ADDED
@@ -0,0 +1,94 @@
1
+ import numpy as np
2
+ cimport numpy as np
3
+
4
+
5
+ cdef np.ndarray nans(int dims)
6
+
7
+
8
+ cdef class Indexed:
9
+ cdef public list values
10
+ cdef public float max_series_length
11
+ cdef unsigned short _is_empty
12
+
13
+
14
+ cdef class TimeSeries:
15
+ cdef public long long timeframe
16
+ cdef public Indexed times
17
+ cdef public Indexed values
18
+ cdef float max_series_length
19
+ cdef unsigned short _is_new_item
20
+ cdef public str name
21
+ cdef dict indicators # it's used for indicators caching
22
+ cdef list calculation_order # calculation order as list: [ (input_id, indicator_obj, indicator_id) ]
23
+
24
+ cdef _update_indicators(TimeSeries self, long long time, object value, short new_item_started)
25
+
26
+
27
+ cdef class Indicator(TimeSeries):
28
+ cdef TimeSeries series
29
+ cdef TimeSeries parent
30
+
31
+
32
+ cdef class RollingSum:
33
+ """
34
+ Rolling fast summator
35
+ """
36
+ cdef unsigned int period
37
+ cdef np.ndarray __s
38
+ cdef unsigned int __i
39
+ cdef double rsum
40
+ cdef unsigned short is_init_stage
41
+
42
+ cpdef double update(RollingSum self, double value, short new_item_started)
43
+
44
+
45
+ cdef class Bar:
46
+ cdef public long long time
47
+ cdef public double open
48
+ cdef public double high
49
+ cdef public double low
50
+ cdef public double close
51
+ cdef public double volume
52
+
53
+ cpdef Bar update(Bar self, double price, double volume)
54
+
55
+ cpdef dict to_dict(Bar self, unsigned short skip_time=*)
56
+
57
+
58
+ cdef class OHLCV(TimeSeries):
59
+ cdef public TimeSeries open
60
+ cdef public TimeSeries high
61
+ cdef public TimeSeries low
62
+ cdef public TimeSeries close
63
+ cdef public TimeSeries volume
64
+
65
+ cpdef short update(OHLCV self, long long time, double price, double volume=*)
66
+
67
+ cpdef _update_indicators(OHLCV self, long long time, object value, short new_item_started)
68
+
69
+ cpdef object append_data(
70
+ OHLCV self,
71
+ np.ndarray times,
72
+ np.ndarray opens,
73
+ np.ndarray highs,
74
+ np.ndarray lows,
75
+ np.ndarray closes,
76
+ np.ndarray volumes
77
+ )
78
+
79
+
80
+ cdef class Trade:
81
+ cdef public long long time
82
+ cdef public double price
83
+ cdef public double size
84
+ cdef public short taker
85
+
86
+
87
+ cdef class Quote:
88
+ cdef public long long time
89
+ cdef public bid
90
+ cdef public ask
91
+ cdef public bid_size
92
+ cdef public ask_size
93
+
94
+ cpdef double mid_price(Quote self)