• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

quantopian / zipline
87%
master: 88%

Build:
Build:
LAST BUILD BRANCH: patch-1
DEFAULT BRANCH: master
Repo Added 18 Jun 2014 05:52PM UTC
Files 183
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH remove-repetitive-type-checking
branch: remove-repetitive-type-checking
CHANGE BRANCH
x
Reset
  • remove-repetitive-type-checking
  • 1m_history_bugfix
  • 579
  • Order-In-Init-Error
  • actually-simple-transforms
  • add-max-drawdown-duration
  • add-multiplesymbols-extra
  • add-multiplesymbols-extras
  • add-security-class
  • add-security-fields
  • add_risk_to_datapanel
  • and-osx
  • asset-db-writer
  • asset-db-writer-legacy
  • asset-db-writer-update
  • asset-finder-backed-by-db
  • asset-finder-backed-by-db-2
  • avoid-dt-index-on-risk-update
  • before_trading_start
  • blotter_open_orders_2
  • blotter_perf_rebase
  • broker_order_statuses
  • bug_5089
  • bump_to_pandas_15
  • cache-event-processors
  • cache-treasury-curves-as-dataframe
  • calendar-clean
  • call-algo-initialize-after-init
  • check-travis-pip-install
  • clarify-assets-test
  • cleanup-asset-tests
  • cleanup_fastseries
  • conda-root-version
  • conda-updates
  • consume-metadata-error-text
  • context.account
  • daily-container-contruction
  • daily-mode-schedule-function
  • daily_returns
  • dale_perf
  • dividend-adjusted-price
  • dividend-pay-time
  • dividend-payout-timing
  • dividend_table
  • dnt-knowledge-date-move
  • dnt_list
  • dnt_list2
  • do_not_modify_security_lists_directory
  • docs
  • docs_mknotes
  • dont-copy-that-floppy
  • downgrade_logbook
  • dynamic-history-length-missing-dts
  • dynamic-history-still-not-right
  • end-of-year-rule
  • event-contains-uses-hasattr
  • event-manager-fixes
  • event-manager-rework
  • event-rule-additions
  • exception-on-nan-order-value
  • exchange-calendars-v2
  • expand_perf_packet
  • factor-out-position-calc-creation
  • fastseries
  • ffc-api-rebase
  • ffc-fixes
  • fix-get-datetime
  • fix-minute-bar-siblings
  • fix-zipline-magic
  • fix_3317
  • fix_api
  • fix_dividend_boundary_conditions
  • fix_history_columnar_assignment
  • fixed-zero-last-sale-price
  • fixes-for-asset-finder-integration
  • force-nose-install
  • futures-api
  • futures-auto-close
  • futures-auto-close-timing
  • futures-knowledge-date
  • futures-lookup-revisions
  • futures-trading
  • get-trading-minutes
  • get_datetime_tz_kwarg
  • group-events
  • history-cleanup
  • history-cleanup-rebase
  • history-cleanup-rebase-maint
  • history_perf_rebased
  • history_perf_rebased_2
  • history_support_daily_input
  • improve-risk-update-speed
  • just-fastseries
  • lazy-mainline
  • limit-slippage
  • loader_fixes
  • log-history-update-failure
  • lookup-future-chain-nat
  • master
  • max-leverage
  • minor_zipline_path_fix
  • more-detail-on-missing-benchmark-return
  • more-ffc-fixes
  • move-serialization-methods-into-zipline
  • moved-perf-tracker-assignment
  • net_liquidation_bug
  • new_tweak_warnings_module
  • no-more-threadbound
  • not-so-simple-transforms
  • off-by-one
  • open-orders-bug
  • optimize_history_update
  • order-target-update
  • ordered_pip_args
  • orders-by-modified-leak
  • pandas-16-upgrade
  • pandas15
  • pandas_index_union_fix
  • pandas_update
  • pandas_upgrade
  • param_set
  • pass-arrays-directly-to-risk-calcs
  • perf_tracker_backports_rebase
  • perf_tracker_rebase
  • pip-compiled
  • portfolio-init-error
  • position-dict-no-longer-uses-missing
  • position_tracker_refactor_post_serialization_rebase
  • pr/416
  • prevent-duplicate-dividends
  • pypi_update
  • q-or-zipline
  • q1-release
  • record-dynamic-naming
  • refactor_algo_simulator
  • refactor_sim_factory
  • remove-bar-count-source
  • remove-conda-install-of-nose
  • remove-dependency-on-intraday-risk-metrics
  • remove-event-count
  • remove-extra-metadata-pass
  • remove-identifier-caching
  • remove-more-transform
  • remove-noopy-asset-finder-test
  • remove-old-serialization-code
  • remove-overnight-minutes
  • remove-position-proxy
  • remove-string-is-checks
  • remove-unused-property
  • remove-unused-returns
  • remove_deprecated_method
  • remove_unused_algorithm_methods
  • rename-security-to-asset
  • risk-metrics-float-cast
  • risk_beta_nans
  • root-symbol
  • rotate-anaconda-token
  • sane-setup
  • schedule-function-offsets
  • schedule-function-runtime-errors
  • schedule_check
  • serialization
  • setup_py_improvements
  • siddata_max_bars_rebase
  • skip_nans
  • splits_fixes
  • static-symbol-lookup
  • stop-record-changing-results
  • talib_optional
  • test-travis-python-3
  • the-schedule-function-journey-will-never-end
  • travis-build-fix-and-reduction-of-number-of-jobs
  • travis-pip-cache
  • tutorial3
  • unhashable-field
  • unroll-process-event
  • update-last-sale-pos-speedup
  • update-statsmodels-and-requirements-files
  • upgrade_nose_parameterized
  • use-filename-as-symbol
  • use-loggers
  • use-memory-views-for-risk-calc
  • use-notice-date
  • use-symbol-lookup-in-algo
  • use-tolerant-equals-for-order-target-percent
  • use_astimezone
  • v0.7.0
  • v0.7.0rc1
  • v0.8.0rc1
  • verbose-invalid-transform
  • verbose-order-init-error
  • visualize-ffc
  • volumeshare_fp_error
  • welcome-to-the-family
  • widebar_origin
  • widebar_origin_2
  • win10-setuptools

pending completion
3122

push

travis-ci

ehebert
PERF: Use specific methods for processing events.

By having both the trade simulation main loop route events to "process"
methods based on event type and the process methods also checking event
type, there was some duplicated effort in doing that comparison many
times.

A particular case where this was noted in profiling was for the
`process_event` function which was checking if the type was not a trade
and returning early, when in a larger universe of stocks the value
returned False 99% of the time.

Instead provide separate process functions specific to each type,
e.g. e.g. `process_trade` and `process_transaction` and route traffic to
those functions in tradesimulation.

For a universe of 160 stocks on both no-op algo and an algo that rebuys
its universe every day, saw about a 10% increase locally.

Also:

- Add process_benchmark to blotter since internal subclass relies on
logic on benchmark, this allows the internal process_trade to be a
`pass`.

- Add warning on unrecoginzed event types.

5429 of 6216 relevant lines covered (87.34%)

1.75 hits per line

Relevant lines Covered
Build:
Build:
6216 RELEVANT LINES 5429 COVERED LINES
1.75 HITS PER LINE
Source Files on remove-repetitive-type-checking
  • List 0
  • Changed 5
  • Source Changed 2
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
3122 remove-repetitive-type-checking PERF: Use specific methods for processing events. By having both the trade simulation main loop route events to "process" methods based on event type and the process methods also checking event type, there was some duplicated effort in doing that... push 08 May 2015 05:10PM UTC ehebert travis-ci pending completion  
3120 remove-repetitive-type-checking PERF: Use specific methods for processing events. By having both the trade simulation main loop route events to "process" methods based on event type and the process methods also checking event type, there was some duplicated effort in doing that... push 08 May 2015 10:30AM UTC Eddie Hebert travis-ci pending completion  
3118 remove-repetitive-type-checking PERF: Use specific methods for processing events. By having both the trade simulation main loop route events to "process" methods based on event type and the process methods also checking event type, there was some duplicated effort in doing that... push 08 May 2015 10:21AM UTC Eddie Hebert travis-ci pending completion  
See All Builds (5516)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc