Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
This gem provides a module containing a set of methods to download, maintain, provide and analyze the COT data issued by the CFTC. It is part of the Cotcube suite.
Add this line to your application's Gemfile:
gem 'cotcube-cftcsource'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install cotcube-cftcsource
The gem expects a configfile 'cftcsource.yml', located in '/etc/cotcube/' on linux platform and '/usr/local/etc/cotcube/' on FreeBSD. The location of the configfile can be overwritten by passing the according parameter to init
.
Following parameters are currently supported (please let me know if something is missing):
data_path: 'path where the raw downloaded data is saved and other data is cached'
symbols_file: 'A file containing a CSV with supported symbols--if ommited, an example set from constants.rb is used'
headers_path: 'Where the CSV headers for cot data and signal sets are cached.'
default_lookback: 'the amount of weeks to be used for indicators in signal processing'
default_set: 'the name of the indicator set to be used (as saved in etc/cotcube/indicators-<default_set>.rb)
Basically sets up 3 constants:
CftcSource.fetch
downloads and unzips all COT-packages from CFTC.gov matching the :year parameter, defaulting to the current year.
Please see https://cftc.gov/MarketReports/CommitmentsofTraders/HistoricalCompressed/index.htm for which year parameters are available.
CftcSource.distribute
breaks down the packages into the separated ID based directory tree.
NOTE: When building from scratch you should fetch and distribute all packages in proper annual order, as each run just updates data after the last available record.
Returns the requested series of raw COT data for given either :symbol or :id. The parameter :subset currently filters for 'std_count', a further implementation is pending. If :subset is set to false, the complete series is returned.
Based on the data returned by CftcSource.provide and the given indicator set, a series is created, cached and returned.
The default indicator simply calculates the net positions for pairs of _long
and _short
. Other indicator sets can be created. A simple example is in etc/cotcube/indicators-example.rb
.
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/donkeybridge/bitangent.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that cotcube-cftcsource demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.