Skip to content

Commit

Permalink
Merge branch 'develop' into doc_links
Browse files Browse the repository at this point in the history
  • Loading branch information
robcarver17 authored Feb 8, 2024
2 parents 0f9a06a + 6b8431b commit d87ad28
Show file tree
Hide file tree
Showing 29 changed files with 428 additions and 372,032 deletions.
4,312 changes: 0 additions & 4,312 deletions data/futures/adjusted_prices_csv/BEL20.csv

This file was deleted.

22,442 changes: 0 additions & 22,442 deletions data/futures/adjusted_prices_csv/EDOLLAR.csv

This file was deleted.

42,563 changes: 0 additions & 42,563 deletions data/futures/adjusted_prices_csv/LUMBER.csv

This file was deleted.

28,788 changes: 0 additions & 28,788 deletions data/futures/adjusted_prices_csv/MID-DAX.csv

This file was deleted.

14,997 changes: 0 additions & 14,997 deletions data/futures/adjusted_prices_csv/NIFTY.csv

This file was deleted.

29,562 changes: 0 additions & 29,562 deletions data/futures/adjusted_prices_csv/RAPESEED.csv

This file was deleted.

20,302 changes: 0 additions & 20,302 deletions data/futures/adjusted_prices_csv/USIRS10.csv

This file was deleted.

494 changes: 0 additions & 494 deletions data/futures/adjusted_prices_csv/USIRS2ERIS.csv

This file was deleted.

20,418 changes: 0 additions & 20,418 deletions data/futures/adjusted_prices_csv/USIRS5.csv

This file was deleted.

2,109 changes: 0 additions & 2,109 deletions data/futures/adjusted_prices_csv/USIRS5ERIS.csv

This file was deleted.

2 changes: 1 addition & 1 deletion data/futures/csvconfig/spreadcosts.csv
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ HSCEI-DIV,0.0
HUF,6.5000000000000004e-06
HUFEUR,0.0
IBEX_mini,2.5
IBXEX,0.0
IBEX,0.0
IG,0.029
IND-BANK,0.0
IND-FIN,0.0
Expand Down
4,340 changes: 0 additions & 4,340 deletions data/futures/multiple_prices_csv/BEL20.csv

This file was deleted.

22,462 changes: 0 additions & 22,462 deletions data/futures/multiple_prices_csv/EDOLLAR.csv

This file was deleted.

42,563 changes: 0 additions & 42,563 deletions data/futures/multiple_prices_csv/LUMBER.csv

This file was deleted.

28,788 changes: 0 additions & 28,788 deletions data/futures/multiple_prices_csv/MID-DAX.csv

This file was deleted.

14,997 changes: 0 additions & 14,997 deletions data/futures/multiple_prices_csv/NIFTY.csv

This file was deleted.

29,562 changes: 0 additions & 29,562 deletions data/futures/multiple_prices_csv/RAPESEED.csv

This file was deleted.

20,302 changes: 0 additions & 20,302 deletions data/futures/multiple_prices_csv/USIRS10.csv

This file was deleted.

494 changes: 0 additions & 494 deletions data/futures/multiple_prices_csv/USIRS2ERIS.csv

This file was deleted.

20,418 changes: 0 additions & 20,418 deletions data/futures/multiple_prices_csv/USIRS5.csv

This file was deleted.

2,109 changes: 0 additions & 2,109 deletions data/futures/multiple_prices_csv/USIRS5ERIS.csv

This file was deleted.

372 changes: 372 additions & 0 deletions data/futures/roll_calendars_csv/IBEX_mini.csv

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions data/futures/roll_calendars_csv/NIFTY-IN.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
DATE_TIME,current_contract,next_contract,carry_contract
2022-09-22 23:00:00,20220900,20221000,20221000
2022-10-11 23:00:00,20221000,20221100,20221100
2022-11-11 23:00:00,20221100,20221200,20221200
2022-12-12 23:00:00,20221200,20230100,20230100
2023-01-11 23:00:00,20230100,20230200,20230200
2023-02-10 23:00:00,20230200,20230300,20230300
2023-03-10 23:00:00,20230300,20230400,20230400
2023-04-11 23:00:00,20230400,20230500,20230500
2023-05-11 23:00:00,20230500,20230600,20230600
2023-06-12 23:00:00,20230600,20230700,20230700
2023-07-11 23:00:00,20230700,20230800,20230800
2023-08-11 23:00:00,20230800,20230900,20230900
2023-09-11 04:45:00,20230900,20231000,20231000
11 changes: 11 additions & 0 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,17 @@ And now install the dependencies
(3.10.13) $ pip install -r requirements.txt
```

### MacOS (ARM)

If you're running MacOS on one of the new ARM chips, the process is more complex. You'll need Homebrew and the Apple XCode Commandline Development Tools, configured for ARM. Doing that is beyond the scope of this document, type `homebrew apple xcode command line tools` into your favourite search engine. Once installed and configured, run installation script:

```
chmod u+x install_dependencies_apple_silicon.sh
./install_dependencies_apple_silicon.sh
```
Note: this may (unfortunately) become out of date and require some tweaking.

### Check dependencies

Check what is installed, should look something like
Expand Down
11 changes: 11 additions & 0 deletions install_dependencies_apple_silicon.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

# Cython 3.0.0 is not supported by pandas 1.0.5
python -m pip install "cython<3.0.0" wheel
python -m pip install pyyaml==5.4.1 --no-build-isolation
python -m pip install "numpy>=1.19.4,<1.24.0" --no-use-pep517
python -m pip install scipy --no-use-pep517
python -m pip install pandas==1.0.5 --no-use-pep517
python -m pip install statsmodels==0.12.2 --no-use-pep517

pip install -r requirements_apple_silicon.txt
9 changes: 9 additions & 0 deletions requirements_apple_silicon.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
matplotlib>=3.0.0
pymongo==3.11.3
arctic==1.79.2
ib-insync==0.9.86
psutil==5.6.6
pytest>6.2
Flask>=2.0.1
Werkzeug>=2.0.1
PyPDF2>=2.5.0
5 changes: 5 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,13 @@ def dir_this_file():
package_data=package_data,
long_description=read("README.md"),
install_requires=[
<<<<<<< HEAD
"pandas==2.1.3",
"matplotlib>=3.0.0",
=======
"pandas==1.0.5",
"matplotlib>=3.0.0,<3.8.0",
>>>>>>> bcfd9668056ff6748edd37538e079dbf22c657e4
"ib-insync==0.9.86",
"PyYAML>=5.3",
"numpy>=1.24.0",
Expand Down
1 change: 1 addition & 0 deletions sysexecution/stack_handler/roll_orders.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ def create_instrument_roll_order_closing_priced_contract(
return instrument_order



def get_strategy_name_with_largest_position_for_instrument(
data: dataBlob, instrument_code: str
) -> str:
Expand Down
13 changes: 4 additions & 9 deletions sysexecution/tick_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,16 @@
from syscore.constants import arg_not_supplied

TICK_REQUIRED_COLUMNS = ["bid_price", "ask_price", "bid_size", "ask_size"]
TICK_REQUIRED_COLUMNS.sort()


class dataFrameOfRecentTicks(pd.DataFrame):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
columns = self.columns
sorted_columns = sorted(columns)

try:
assert all([x == y for x, y in zip(sorted_columns, TICK_REQUIRED_COLUMNS)])
except:
raise Exception(
"historical ticks should have columns %s" % str(TICK_REQUIRED_COLUMNS)
)

assert set(TICK_REQUIRED_COLUMNS).issubset(
columns
), "historical ticks should have columns %s" % str(TICK_REQUIRED_COLUMNS)

def average_bid_offer_spread(self, remove_negative=True) -> float:
return average_bid_offer_spread(self, remove_negative=remove_negative)
Expand Down

0 comments on commit d87ad28

Please sign in to comment.