![]() ![]() Records and mapped arrays: In-house data structures for analyzing complex data, such as simulation logs.stats () Start 0 End 6 Period 7 days 00:00:00 Total 4 Rate 57.142857 First Index 1 Last Index 5 Norm Avg Index -0.083333 Distance: Min 1 days 00:00:00 Distance: Max 2 days 00:00:00 Distance: Mean 1 days 08:00:00 Distance: Std 0 days 13:51:23.063257983 Total Partitions 2 Partition Rate 50.0 Partition Length: Min 1 days 00:00:00 Partition Length: Max 3 days 00:00:00 Partition Length: Mean 2 days 00:00:00 Partition Length: Std 1 days 09:56:28.051789035 Partition Distance: Min 2 days 00:00:00 Partition Distance: Max 2 days 00:00:00 Partition Distance: Mean 2 days 00:00:00 Partition Distance: Std NaT dtype: object Adapter for QuantStats.Īnalyze the distribution of signals in a mask > index = > mask = pd. Performance metrics: Numba-compiled versions of metrics from empyrical and their rolling versions.plot ( close_trace_kwargs = dict ( visible = False ), fig = fig ) plot ( trace_kwargs = dict ( name = 'Slow MA' ), fig = fig ) > pf. plot ( trace_kwargs = dict ( name = 'Fast MA' ), fig = fig ) > slow_ma. plot ( trace_kwargs = dict ( name = 'Close' )) > fast_ma. from_signals ( price, entries, exits, fees = 0.005 ) > pf. ma_crossed_above ( slow_ma ) > exits = fast_ma. run ( price, 200, short_name = 'slow_ma' ) > entries = fast_ma. run ( price, 50, short_name = 'fast_ma' ) > slow_ma = vbt. Combines many features across vectorbt into a single behemoth class.īacktest the Golden Cross > price = vbt. ![]() ![]() Supports shorting and individual as well as multi-asset mixed portfolios. Supports two major simulation modes: 1) vectorized backtesting using user-provided arrays, such as orders, signals, and records, and 2) event-driven backtesting using user-defined callbacks. Flexible and powerful simulation functions for portfolio modeling, highly optimized for highest performance and lowest memory footprint. Portfolio modeling: The fastest backtesting engine in open source: fills 1,000,000 orders in 70-100ms on Apple M1.exits 0 1 2 0 False False False 1 False False False 2 True True True Modeling ¶ entries 0 1 2 0 True False False 1 False True False 2 False False True > my_sig. def exit_choice_func ( from_i, to_i, col ). def entry_choice_func ( from_i, to_i, col ). Place entries and exits using custom functions >. The easiest and most flexible way to create indicators you will find in open source. Takes a function and does all the magic for you: generates an indicator skeleton that takes inputs and parameters of any shape and type, and runs the vectorbt's indicator engine. Indicator factory: Sophisticated factory for building custom technical indicators of any complexity.sma_indicator smaindicator_window 2 3 0 NaN NaN 1 1.5 NaN 2 2.5 2.0 3 3.5 3.0 4 4.5 4.0 # pandas-ta support > vbt. Series (, dtype = float ) # built-in > vbt. Compute 2 moving averages at once > price = pd. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |