semvec/pypi-packages huggingface dataset:
biomaj-ftp 3.0.7
BioMAJ FTP server

# Biomaj ftp

Biomaj FTP server to access production banks

anonymous access is allow with login *anonymous* and any fake password.
Existing users can access server with the login and API key as password.

Only public or owned banks are accessible

# Config

config.yml contains the server configuration.
Mongo configuration should be the same one than biomaj.

Web endpoint refers to the biomaj API endpoint

# Run

export BIOMAJ_CONFIG=path_to_config.yml

python bin/biomaj_ftp_service.py

# Docker

To run in a Docker container, do not forget to open passive ports range (60000, 65535)


3.0.7:
  update dependencies and pyyaml loader
3.0.6:
  Add ftp/masquerade_address in config or MASQUERADE_ADDRESS env variable to define address ftp server should advertise (mainly for docker)
3.0.5:
  Allow proxy endpoint definition for daemon, else use default web.local_endpoint
3.0.4:
  Add passive ports setup, range(60000, 65535)
  Modify login: use login and api key to access to all available banks instead of connecting to one bank
3.0.3:
  Set consul checks
3.0.2:
  Allow override of config
  Fix user authentication
  Load database settings from global.properties to match same database than biomaj
3.0.1:
  Fix anonymous access and case where web/local_endpoint is not defined in config.yml
3.0.0:
  FTP server to access banks
strategy-tester 0.1.4
A python package for testing strategies
Keywords: python,strategy,tester,trading,backtesting,performance

# strategy tester
## Installation
``` bash
pip install -r requirements.txt
```
## Usage
Here a snippet of the strategy tester:

```python
from strategy_tester import StrategyTester
import pandas as pd
import pandas_ta as ta
from pandas_ta_supplementary_libraries import *
import numpy as np

class SimpleStrategy(Strategy):

    def indicators(strategy):
        # Set all indicators here
        strategy.in_long = False
        strategy.in_short = False
        ma = Indicator("ma", ta.sma, args=(strategy.close, 100))

    def condition(strategy):
        strategy.conditions = ma,

    def trade_calc(strategy, row):
        if row.close > row.ma:
            if strategy.in_short:
                strategy.exit("short")
                strategy.in_short = False
            strategy.entry("long", "long")
            strategy.in_long = True
        elif row.close < row.ma:
            if strategy.in_long:
                strategy.exit("long")
                strategy.in_long = False
            strategy.entry("short", "short")
            strategy.in_short = True

strategy = SimpleStrategy(data)
# Run the strategy tester
strategy.run()
# Get back test results
backtest = strategy.backtest()
# Get list of trades
list_of_trades = strategy.list_of_trades()
# Get list of open positions
list_of_open_positions = strategy.open_positions
# Get list of closed positions
list_of_closed_positions = strategy.closed_positions
```

## Repository
[Github](https://github.com/ali-ardakani/strategy_tester)
[pypi](https://pypi.org/project/strategy-tester/)