This file serves as the journal for the half_tael_DQN project.
- The
CHANGELOG.md
has three sections.- Broadcast: Briefing of upcoming events or reminders (like this one).
- Meeting: Summaries for meetings.
- Development Journal: Records for development updates.
- For the sake of consistency, I suggest we update this
CHANGELOG.md
in a date descending order (new-to-old) with a headline format ofYYYY-MM-DD | Highlight | Name
. Note theHighlight
andName
parts can be omitted if not applicable, e.g.- This broadcast headline, which omits
Name
. - Under Development Journal as
2019-04-10 | Henry Zhong
, which omitsHighlight
.
- This broadcast headline, which omits
- Henry
- ✅ Developed Anita v2.0: Basic framework for persona-driven reward influencing interface.
- ✅ Accomplished everything in the half_tael_v4.5: Refactor to work with Anita_v2.0 + Proper documentation.
- ✅ Released half_tael_DQN v4.5.
- Henry
- ✅ Release half_tael_DQN v3.0: Virtual Trading Platform with DQN v3.0.
- Accomplished everything in the related milestone.
- Works presented as half_tael_DQN v3.0: Virtual Trading Platform with DQN v3.0.
- ✅ Release half_tael_v4.0: Textual output + Improved cohesion + Documentations.
- Accomplished everything in the related milestone.
- Works presented as DQN_v3.0 with improved cohesion, textual output, and documentation.
- ❌ 🚧 Develop Anita v2.0: Basic framework for persona -driven reward influencing interface.
- ✅ Release half_tael_DQN v3.0: Virtual Trading Platform with DQN v3.0.
- Henry
- Henry
- ✅ 🚧 Refactor half_tael_v2.0 to v3.0, in compliant with DQN_v2.5 (multiple currency model working with the trading platform).
- Delivered a runnable demo with certain freedom on params (
3
price info at the same timestamp. - Bugfix required on cost (loss) graph converges way too quick and smooth..
- Delivered a runnable demo with certain freedom on params (
Anita v2.0- Postponed as legacy Anita is unusable, check 2019-08-08 | Legacy Anita plot hole discovered | Henry in section Development Journal for details.
- ✅ 🚧 Refactor half_tael_v2.0 to v3.0, in compliant with DQN_v2.5 (multiple currency model working with the trading platform).
-
Henry
- ✅ Test the reward design (for Anita).
Anita v2.0- Postponed due to prioritized on debugging DQN v2.5.
- ✅ DQN v2.5: Debugged and partially adjusted the CNN + DQN model which supports multiple (>2) currencies based on Steven X.'s design (ef6e716). Presented a runnable demo only on a specific dummy data set -- Henry.
-
Steven
- Henry
- ✅ Understand CNN basic.
- Steven
- ✅ Fully understand the basic of CNN as in the relationship between
w_1
,b_1
,n_features
, and inputdata_env
- ❌ 🚧 DQN v2.5.
- Postpone to 2019-08-09, but made significant progress on understanding the mapping of matrix convolution.
- ✅ Fully understand the basic of CNN as in the relationship between
Steven absent, postpone to 2019-08-06 to discuss DQN v2.5.- ❌ 🚧 DQN v2.5.
- Tried to utilize CNN to scan input with multiple dimension (support trading among multiple (>2) currencies). But it is indeed technically challenged since:
- The original DQN v1.0 (and also DQN v2.0) was built on a modification of Morvan's environment, which only considered one-dimensional input.
- There aren't too much readable TensorFlow CNN+DQN source code we can referenced on. And it will forgo a serious portion of work on DQN v1.0 and v2.0 if we want to redesign our environment base on another project.
- Resolution: Steven will try to deliver his demo by Scrum #6 (2019-08-07). If not, we will shift focus from Morvan to another tutorial and redesign the environment. We want to stick with Morvan if possible as DQN v2.0 is fully developed, but as the reward part is relatively stand-alone from DQN v1.0 but more coupled to the trading platform (which is fully developed and will keep using), the cost is still acceptable as long as we can quickly implement the transformation code to change the environment from pixel games to numerical forex market. Potential reference include:
- Tried to utilize CNN to scan input with multiple dimension (support trading among multiple (>2) currencies). But it is indeed technically challenged since:
- Goal
- Henry
- Integrate Steven's trial DQN model (two-currency) with Henry's custom virtual trading platform.
-
Steven
- Refactor his trial DQN with model improvement, present a runnable demo.
- Support trading among multiple (>2) currencies.
- Implement a model design which understand the relation between timeframe.
- Research about the possibility of using
vector
as first layer nodes in RNN design.
- Sample data as:
- Train: USD_JPY_GBP_2017-01-01T00:00:00_2018-01-01T00:00:00_M5.csv (74,277 rows).
- Test: USD_JPY_GBP_2018-01-01T00:00:00_2019-01-01T00:00:00_M5.csv (74,590 rows).
- Lightweight trial data for development: USD_JPY_GBP_2019-01-01T00:00:00_2019-02-01T00:00:00_M5.csv (6,358 rows).
- Refactor his trial DQN with model improvement, present a runnable demo.
- Review
- Henry
- ✅ Delivered as DQN_v2.0 Folder by commit
#6a051da
. Check milestone #2.
- ✅ Delivered as DQN_v2.0 Folder by commit
- Steven 2. ❌ 🚧 Work in progress as required to set up with server, will deliver on 2019-08-05. Check milestone #3
- Henry
- Goals
-
Henry
- Draft version control standard and contribution guideline (2019-07-26).
- Finish basic DQN learning.
-
Steven 2. Document the two-currency DQN model (2019-07-26).
-
Jian 3. Develop a set of evaluation functions to evaluate the status (weight) of certain metrics introduced in Anita Folder. * Such functions should take
_time
,_currency_pair
,_volume
,trade_action
(long, short, hold) and any other necessary parameters (e.g. historicaltrade_log
) as inputs and return afloat
number between-1
to1
as a reflection of the status of such metrics at this particular position.* Sample data as: * [USD_JPY_GBP_2017-01-01T00:00:00_2018-01-01T00:00:00_M5.csv](https://github.com/choH/half_tael_DQN/blob/master/arena_data/USD_JPY_GBP_2017-01-01T00:00:00_2018-01-01T00:00:00_M5.csv) (74,277 rows). * If the above data is too huge , you may always refer to [USD_JPY_GBP_2019-01-01T00:00:00_2019-02-01T00:00:00_M5.csv](https://github.com/choH/half_tael_DQN/blob/master/arena_data/USD_JPY_GBP_2019-01-01T00:00:00_2019-02-01T00:00:00_M5.csv) as a lightweight alternative (6,358 rows).
-
- Review
- Henry
- ✅ Delivered as
CONTRIBUTING.md
by commit#dd7e0ce
. - ✅ Finished most DQN part. Check issue #2.
- ✅ Delivered as
- Steven
3. ✅ Delivered as trial_DQN_doc.docx by commit
#2b10528
. Check issue #1. * Absent due to sickness, showed up and discussed on 2019-08-01. - Jian
- ✅ Delivered a bunch of file in anita_v1.1 folder by commit
#90fd3c0
, commit#4e93d2b
, and commit#d9bd1aa
.- ❓ QA not yet performed. Will update milestone #1 once performed.
- Absent due to interview conflict, not yet showed up.
- ✅ Delivered a bunch of file in anita_v1.1 folder by commit
- Henry
-
Goals:
- Henry
- Implement trading interface.
- Write user manual on such trading interface.
- Draft version control standard and contribution guideline.
- Steven
- Run a trial DQN model on any
USD_JPY
file in ./dummy_data.
- Run a trial DQN model on any
- Jian
- Help Steven on building the basic DQN model.
- Quantified Anita's personality on trading behavior.
- Research some high-end DQN structure and make a presentation.
- Henry
-
Review
-
Henry
- ✅
trade_interface.py
fully developed by commit#5d86b5d
.
- ✅ Available as:
- Demo code delivered by commit
#5a62409
- User manual delivered by commit
#042ef13
- Demo code delivered by commit
- ❌ Version control standard and contribution guideline postpone to 2019-07-25.
- ✅
-
Steven
- ✅ Trial DQN is runnable, will commit after Henry's version control standard and contribution guideline becomes available.
-
Jian
- ☑️ Trial DQN is a solo work done by Steven, however Jian did implemented a Cartpole demo.
- ❌ Did not delivery as Jian believes it is not feasible to do it stand-alone (without the DQN code).
- After discussion, we all agree it is doable and such task is postpone to 2019-07-30.
- ✅ Introduced some fundamental DQN features (remember, replay).
-
-
Goals
- ALL:
- Get familiar with basic Q-learning and DQN concept in general.
- Henry:
- Build a basic wrapper to communicate with OANDA API as the backend of the project. Anul's code
Oanda_Trader.py
can be use as reference.
- Build a basic wrapper to communicate with OANDA API as the backend of the project. Anul's code
- Steven:
- Run a trial DQN model on
SP 500USD_JPY_0.csv
.- Task change due to CSV file of foreign exchange between USD and JPY is easily obtainable -- Henry.
- Run a trial DQN model on
- Jian:
Research and present some insight regarding the possible designs of DQN model.
- Understand the concept of Anita, and define a quantified standard for "trading personality" according to Mapping Personality Traits to Investment Behavior (Revised) and Strategies and Metrics.xlsx
- Task change due to update form Dr. Lin regarding Anita. As "trading bot with personalities" is the unique selling point of this project, we should only research in designs which are compatible with such idea. Thus we should quantify the concept of "trading personality" first -- Henry.
- ALL:
-
Review
-
All
- Henry: ❌ 🚧 Work-in-progress on DQN.
- Steven: ✅ Basic DQN learned.
- Jian: ✅ Basic DQN learned
-
Henry
- ✅ Delivered by commit
ac4d217
.
- ✅ Delivered by commit
-
Steven 2. ❌ 🚧 Work-in-progress, will delivery by on 2019-07-24.
-
Jian
❓ Absent for the day, will catch up on 2019-07-22 -- Henry.- ❌ 🚧 Work-in-progress, will deliver by on 2019-07-24.
-
- Anul gave a presentation of his
forex
side-project, mainly regarding the method of interaction with OANDA, his model try-out, and why he abandoned this project. - Due to the lacks of documentation of Anul's work, we decided to not to take over his project (also because he has moved on to a more combined design base on his
forex
), but to build our own bot. However, we will take his code as an important reference, especially regarding the OANDA API part and model environment setup.
- Update
CHANGELOG.md
and 🔰 User Manual foranita_interface.py
. - Remove (and regenerate to discard the published one) OANDA credential.
- Fix command line instruction mistake in README.md Run section.
- Update
README.md
with information regarding anita_v2.0. - Bugfix log output directory — and also raw_data folder? — not exist issue (with
mkdir
). - Provide a
Trade_Interface config
input with longer time duration. - Generate dynamic
action_list
base on input account currencies (self.TI_train.all_currency_list
).
- Coded anita_v2.0.
- Code mainly delivered as commit
c4aece1
ande9fdf04
. - A "first-draft" user manual for
anita_interface.py
is also written byf73a207
- Code mainly delivered as commit
- Check half_tael_DQN v4.0: DQN_v3.0 with improved cohesion, textual output, and documentation.
- Most effort spent into documenting the project.
- Check half_tael_v3.0: Refactor DQN_v2.5 to work with virtual trading platform.
- Most effort spent into Replace hardcore setting in half_tael_v3.0 model to accept dynamic input by 3ef23cf.
-
Fixed the issued regarding Cost (loss) graph converges way too quick and smooth.
-
Wrong index for
a, r
inbatch_memory
while retrievingeval_act_index
. So when replacing the reward(s), it is not thea, r
being replaced, but two_close
prices data atbatch_memory[: , self.n_features]
andbatch_memory[: , self.n_features + 1]
(therefore it is usually0
or1
as we useas type(int)
during the retrieval) . -
Changed to:
eval_act_index = batch_memory[:, self.n_features * self.n_currencys].astype(int) reward = batch_memory[: , self.n_features * self.n_currencys + 1]
and fixed the bug in commit d2fa6e7.
-
-
Partially removed hardcore code regarding
self.n_features
andself.n_currency
.- CNN
conv2d()
part not yet done, but fixed all reshape-related setting to accept dynamic input.
- CNN
2019-08-14 | Redesigned seetings of CNN | Henry, with help from Ziyu, CHEN.
-
As Steven X. is absent for three days and unresponsive on IM for four days probably due to some unexpected urgencies, I seek Ziyu for help.
-
Ziyu noticed the original
strides
were set tostrides = [1, 2, 25, 1]
, combine withpadding = 'SAME'
andfilter = [6, 6, 1, 32]
on input[-1, 3, 300, 1]
, which effectively "over-padded" the input. as:\[ W_{out} = \frac{W - F_W + 2P}{S_W} + 1 \ \Rightarrow 300 = \frac{300 - 6 + 2P}{25} + 1 \ \ \Rightarrow P = 3603 \ (\text{too many}) \ H_{out} = \frac{H - F_H + 2P}{S_H} + 1 \ \Rightarrow 3 = \frac{3 - 6 + 2P}{2} + 1 \ \ \Rightarrow P = 1.5 \ (\text{not int?}) \ \]
-
We adjusted the setting to be:
strides = [1, 1, 1, 1] filter = [3, 3, 1, 32]
-
I also adjusted the reshape setting in
l1
from32
to3200
to work withstride = [1, 1, 1, 1]
as there will be more output:W_fc1 = self.weight_variable([3 * 3200, 100]) h_pool1_flat = tf.reshape(h_pool1, [-1, 3*3200])
Otherwise the line will break on:
q_target[batch_index, eval_act_index] = reward + self.gamma * np.max(q_next, axis=1) # Before adjustment # q_target[batch_index, eval_act_index].shape: (32, 7) # q_target.shape: (3200, 7) # np.max(q_next, axis =1): (3200, 7)
-
Problem regarding cost converging too fast and smooth remains unsolved, updated
cost_log.txt
for future investigation.- After discussion with Ziyu, it is believed that the CNN part is correctly implemented, but mostly on the DQN part — however Ziyu is not particularly familiar with DQN, I will therefore continue the investigation. It is probably just a simple overfit issue as we only feeds
300
rows of train data and300
rows of test data chronologically right after the training set, due to the power limitation of the laptop.
- After discussion with Ziyu, it is believed that the CNN part is correctly implemented, but mostly on the DQN part — however Ziyu is not particularly familiar with DQN, I will therefore continue the investigation. It is probably just a simple overfit issue as we only feeds
- Be able to trade among three currencies with hardcore setting used in
RL_brain.py
. - Problem regarding cost converging too fast and smooth remains unsolved,
cost_log.txt
saved for future investigation.
- Debugged on Steven's sketch code ef6e716 with various
reshape
manipulations regardingself.memory
,store_transition
andbatch_memory
's slicing infeed_dict
. - Several cosmetic on monitory print-outs.
- Cost converges unreasonable fast and smooth, potentially overfit, need investigation.
-
Debug DQV_v2.0
- solved bugs related to
self.s
andself.s_
forplaceholder�
andreshape
. - solved bugs related to
self.x
andself.x_
onconv2d()
. - Work in progress on figuring out the bugs related to:
transition = np.hstack((s, [a, r], s_)) index = self.memory_counter % self.memory_size self.memory[index, :] = transition
- solved bugs related to
-
Findings:
- After some careful review of legacy_ref/anita folder, I found that the mapping is between personality and financial products. e.g. (letter referred Big Five Personality Traits)
- A persona with high E and low N is good for small cap investment.
- A person with high C, high E, low A, low N is good for foreign exchange investment.
- There are also many disparities between the presentation slides and the metrics spreadsheet. e.g.
- Slides indicate "Momentum Investing (med-high c, high e, high a)," but OCEAN value being 41.25, 40, 36.875, 36.25, and 35 respectively. Where the "mid-high C" is higher than the "high E" and "high A."
- Slide indicate "Income Investing (medium-high e, high n)," but OCEAN value being 36.25, 35, 30, 30, and 32.5. Where the "mid-high E" is in fact the lowest value among five, and the supposedly "high N" ranks only among middle.
- After some careful review of legacy_ref/anita folder, I found that the mapping is between personality and financial products. e.g. (letter referred Big Five Personality Traits)
-
Conclusion: Thus, this is essentially useless to our model as it cannot evaluate if a
trade_action
fits a given personality of not. -
Solution: My thinking is I will discard all Anita legacy and use some technical/fundamental analysis indicators to evaluate the "suitableness between a
trade_action
and given indicator" and therefore influent the reward. How a personality is defined by the indicators will left to future development.
- Implemented
balance_protection
feature ontrade_interface.py
. If the balance of sell currency is not enough to execute the requested trade, such trade will be canceled. The trade log will mark such trade as "failed." (commit#b735aff
) - Discussed with Steven on the action update policy, decided the model does not need to know if an action is actually executed since the NN design will understand that at this
state
thex
action will have bad reward (since equal balance will result in a reward of-1
). - Delivered half_tael_v2.0 by commit
#6a051da
, Still hardcored to GBP due to the fact that DQN v1.0 only supports two-currency. Thus the non-base_currency is set manually. Will automate such part when refactoring with DQN v2.5 to avoid reengineering.- Check milestone #2.
...
####################game over####################
##### Displaying information regarding account "Initial_Checkout_Review (episode: 2)". #####
record_from: 2018-04-13T18:30:00.000000000Z
record_to: 2018-04-16T09:29:00.000000000Z
request_interval: M1
record_rows: 889
trade_log_len: 2
USD: 0
EUR: 100000.0
GBP: 0
##### The information of account "Initial_Checkout_Review (episode: 2)" has been successfully displayed. #####
##### Displaying information regarding account "End_Checkout_Review (episode: 2)". #####
record_from: 2018-04-13T18:30:00.000000000Z
record_to: 2018-04-16T09:29:00.000000000Z
request_interval: M1
record_rows: 889
trade_log_len: 293
USD: 0
EUR: 100025.13121083906
GBP: 0.0
##### The information of account "End_Checkout_Review (episode: 2)" has been successfully displayed. #####
...
- Till 30ec22c, a understanding of DQN v1.0 is built.
- Bug fix on account cumulation with
execute_trade()
fromtrade_interface.py
. - Update hardcore setting (
n_features = 300
, record length to4800
etc, currency asEUR
andGBP
) with relatively more universal adaptability. - Work in progress on commit
#0e0b676
, as a redesign of exception handling oncurrency_balance[_sell_currency] < 0
is needed.- Ask Steven if the model need to know that some of its actions are not executed due to the balance issue.
- Branches half_tael_v2.0, DQN_v2.5, and anita_v1.1 checked out from this commit — aka Release half_tale_DQN v1.0: Virtual Trading Platform + Trial DQN. (commit
#113431e
)
- Initial commit for trial DQN between two currency -- Steven.
- Release tag v1.0 set -- Henry.
- Research git
rebase
and gitbranch
. Designed and draftedCONTRIBUTING.md
by commit#dd7e0ce
to specify the workflow of this project.
2019-07-24 | Discussed merging Steven's experimental DQN code with Henry's trading environment code | Henry, Steve.
- Discussed the design and concern of merging Steven's experimental DQN code with Henry's trading environment code, particularly in:
- How to support trading between multiple currencies (> 2) while making the machine realize some
_close
value is in the same time. - Possibility of using
vector
as first layer nodes in ANN/RNN design. - How to deal with missing
np.nan
in_close
columns.- Increase
request_interval
fromM1
toM5
. - Fill in
np.nan
cell gradual increment/decrement according to non-empty neighborhood cells, while setting_volume
to0
.
- Increase
- How to support trading between multiple currencies (> 2) while making the machine realize some
2019-07-24 | Drafted User Manual for trade_interface.py.md
, implemented checkout_all_in()
method | Henry.
-
Drafted
User Manual for trade_interface.py.md
with demo code available attrain_interface_demo.py
. -
Implemented
checkout_all_in()
method intrade_interface.py
to checkout all currency(s) in account to a particular currency (e.g.USD
). -
Debugged with Steven on his trial DQN model.
##### Displaying information regarding account "End_Checkout_Review". ##### record_from: 2019-01-01T22:00:00.000000000Z record_to: 2019-01-01T23:59:00.000000000Z request_interval: M1 record_rows: 118 trade_log_len: 9 USD: 68536.17872218802 JPY: 0.0 GBP: 0.0 ##### The information of account "End_Checkout_Review" has been successfully displayed. #####
-
Now all input should goes to — or in a form which is similar to —
train_interface.py
with the login info saved inconfig.py
-
Custom exceptions handling implemented, e.g.
During self.get_arena() <class 'trade_interface.OI_Onanda_Error'> is raised due to: {"errorMessage":"Insufficient authorization to perform request."} During self.get_currency_pairs() <class 'trade_interface.TI_Account_Error'> is raised due to: No currency pair(s) between ('USD', 'JAY') from Oanda During self.account_input_eval() <class 'trade_interface.TI_Account_Error'> is raised as: Invalid Oanda granularity input, self.request_interval: H20. During self.account_input_eval() <class 'trade_interface.TI_Account_Error'> is raised as: Invalid account input, self.currency_balance['USD'] must be >= 0 (currently -10). During self.market_LUT() <class 'trade_interface.TI_Market_LUT_Error'> is raised due to: Invalid time input: 2019-01-01T22:30:20.000000000Z During self.execute_trade() <class 'trade_interface.TI_Market_LUT_Error'> is raised as: Time input: 2019-01-01T22:03:00.000000000Z returns np.nan During self.execute_trade() <class 'trade_interface.TI_Execution_Error'> is raised as: USB or GBP is(are) not in ['USD', 'JPY', 'GBP'] During self.execute_trade() <class 'trade_interface.TI_Execution_Error'> is raised as: USD balance < 0 after trade action #0 (currently -127412000.00000001). During self.execute_trade() <class 'trade_interface.TI_Execution_Error'> is raised as: _time 2019-01-01T22:29:00.000000000Z is earlier than pervious action's trade_time 2019-01-01T22:30:00.000000000Z in log. During self.account_input_eval() <class 'trade_interface.TI_Account_Error'> is raised as: self.from_time 2019-01-01T00:00:00Z is earlier than self.to_time 2018-01-02T00:00:00Z.
-
Add feature to retrieve one trade action by
action_id
fromtrade_log
.
-
Bug fixed for perviously mentioned commit
#8248b6f
, trading among multiple currency is now fully supported (commit#443e4d1
).##### Displaying information regarding account "dev_arena_test". ##### record_from: 2019-01-01T22:00:00.000000000Z record_to: 2019-01-01T23:59:00.000000000Z request_interval: M1 record_rows: 118 trade_log_len: 7 USD: 49986.70879394646 JPY: 46692.75 GBP: 50034.09294861774 ##### The information of account "dev_arena_test" has been successfully displayed. #####
-
Support for
trade_unit_in_buy_currency
is implemented (commit#49e1f01
). -
Readable
trade_log_review()
is implemented, now each trade action is expressed in natural language rather than pure JSON.#### Displaying the READABLE trade log of account "dev_arena_test" #### ...... action_id: 5 trade_time: 2019-01-01T23:05:00.000000000Z Trade Decision: Sold 0.547006053533659 USD for 60 JPY Sell Currency Balance: 50056.70879394646 USD Buy Currency Balance: 39016.06 JPY action_id: 6 trade_time: 2019-01-01T23:55:00.000000000Z Trade Decision: Sold 70 USD for 7676.6900000000005 JPY Sell Currency Balance: 49986.70879394646 USD Buy Currency Balance: 46692.75 JPY #### The READABLE trade log of account "dev_arena_test" has been successfully displayed ####
2019-07-19 | Refactored trading interface to handle trading among multiple currency (Bug-fixing in progress) | Henry.
-
Refactored the
trade_interface.py
to handle multiple currency.- Bug on
market_LUT()
price retrive, see commit#8248b6f
.
The requested ARENA record has been successfully exported. file path: ./arena_data/USD_JPY_GBP_2019-01-01T00:00:00_2019-01-02T00:00:00_M1.csv currency pair: ['USD', 'JPY', 'GBP'] from: 2019-01-01T00:00:00Z to: 2019-01-02T00:00:00Z interval: M1 total rows: 118
- Bug on
-
Updated
oanda_interface.py
to wrapDataFrame
return into a custom classOanda_Record
, so that when passed to other method info regarding such record shall preserve. -
Setting goals and time for next two scrum meetings.
-
Developed a
Trade_Interface
class to regulate allowed trading behavior and review portal:- Behaviors: short, long.
- Review: account, trade log.
Account dev_test is built. currency_A: USD currency_B: JPY record_from: 2018-01-01T22:00:00.000000000Z record_to: 2018-06-29T20:59:00.000000000Z currency_A_balance: 9987.859210202378 currency_B_balance: 11364.3 trade_log_len: 4
action_id: 0 trade_time: 2018-01-01T22:02:00.000000000Z trade_type: short trade_price: 112.676 trade_currency: JPY trade_unit: 2000 currency_A_balance: 9982.249991124996 currency_B_balance: 12000
-
Marked places which can be improved in future (exception-handling, decorator log generation).
-
Developed a set of wrapper functions in
oanda_interface.py
, which can interact withoandapyV20
API and output pricing record according to user requested currency pair, start time, end time, interval. -
Output is available in both
DataFrame
and CSV file with command line confirmation on both request and export stage:REQUEST: v3/instruments/USD_JPY/candles InstrumentsCandles {'granularity': 'H1', 'includeFirst': True, 'from': '2018-01-01T00:00:00Z', 'to': '2018-01-21T20:00:00Z'} REQUEST: v3/instruments/USD_JPY/candles InstrumentsCandles {'granularity': 'H1', 'includeFirst': True, 'from': '2018-01-21T20:00:00Z', 'to': '2018-02-11T16:00:00Z'} ... REQUEST: v3/instruments/USD_JPY/candles InstrumentsCandles {'granularity': 'H1', 'includeFirst': True, 'from': '2018-12-21T04:00:00Z', 'to': '2018-12-31T23:59:59Z'}
The requested record has been successfully exported. file path: ./dummy_data/USD_JPY_2018-01-01T00:00:00_2018-12-31T23:59:59_H1.csv currency pair: USD_JPY from: 2018-01-01T00:00:00Z to: 2018-12-31T23:59:59Z interval: H1 total rows: 6217
-
Experienced with commit-message-emoji.
- Finished the Q-learning section of the Morvan course.
- Started the DQN section.
- Hand over the pervious project to be fully committed on this one.