Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MikePia/structjour
/ functions
Functions
1,304 in github.com/MikePia/structjour
⨍
Functions
1,304
◇
Types & classes
156
↓ 4 callers
Method
getTradeList
Creates a python list of DataFrames for each trade. It relies on addTradeIndex successfully creating the trade index in the format Tr
structjour/definetrades.py:302
↓ 4 callers
Method
getrandom
Get a random quote.
structjour/inspiration/inspire.py:449
↓ 4 callers
Method
insertTradeSA
Insert a trade into ib_trades table. Commit not included for speed. :params row:A pandas object that includes the headers:
structjour/statements/ibstatementdb.py:267
↓ 4 callers
Method
openIBStatementCSV
Identify a csv file as a type of IB Statement and send to the right place to open it
structjour/statements/ibstatement.py:190
↓ 4 callers
Method
populateXLMistakeForm
For the export to excel the mistake summary form. Populate the dynamic parts of mistake summaries. That includes fomulas and hyperlin
structjour/view/exportexcel.py:125
↓ 4 callers
Method
removeKey
(cls, api)
structjour/models/api_keymodel.py:67
↓ 4 callers
Method
removeLink
(self, name, url)
structjour/strategy/strategycrud.py:106
↓ 4 callers
Method
setTimeFrame
Set the amount of time before the first transaction and after the last transaction to include in the chart. This may include some tre
structjour/stock/graphstuff.py:194
↓ 4 callers
Method
showTrades
(self)
structjour/view/duplicatecontrol.py:182
↓ 4 callers
Method
stopLoss
Set the stopDiff to the difference between the stoploss and the first entry, then call rrCalc
structjour/view/sumcontrol.py:1231
↓ 4 callers
Method
verifyAvailableCols
Check flxcols against ourcols, remove any cols in ourcols that are missing in flxcols and send a warning :return: ourcols are
structjour/statements/ibstatement.py:828
↓ 3 callers
Method
addFinReqCol
Add the columns from FinReqCol that are not already in dframe. :params dframe: The original DataFrame with the columns of the input f
structjour/definetrades.py:382
↓ 3 callers
Method
addSource
(cls, name, id=None)
structjour/models/strategymodels.py:53
↓ 3 callers
Method
addTradeNameDB
Create a name for this trade like 'AMD Short'. Place it in the c.name column. This could still be a flipped position. The test is ba
structjour/definetrades.py:252
↓ 3 callers
Method
apiChooser
Get a data method as set in self.api :return the method
structjour/stock/apichooser.py:177
↓ 3 callers
Method
append_tag
(cls, trade_sum_id, tag_name=None, tag_id=None)
structjour/models/trademodels.py:150
↓ 3 callers
Function
autoGenCreateDirs
Create the journal directories for the current month and next month. The QSettings value journal must exist and the value for directories_aut
structjour/utilities/util.py:31
↓ 3 callers
Method
chartIntervalChanged
Implementation for signals from interval widgets
structjour/view/sumcontrol.py:442
↓ 3 callers
Function
checkDateDir
Get the date from the path
structjour/statements/findfiles.py:41
↓ 3 callers
Method
checkVersion
(cls, mv, v)
structjour/migrations/_0002_structjour_statement_ibstatementdb.py:75
↓ 3 callers
Method
clearTables
(self)
test/test_ibstatementdb.py:216
↓ 3 callers
Method
connect
(cls)
structjour/migrations/_0002_structjour_statement_ibstatementdb.py:67
↓ 3 callers
Method
createDirs
Create the sub directories in the journal directory
structjour/view/createdirscontrol.py:78
↓ 3 callers
Function
createDirsStructjour
Wrapper to createDirs take care of the structjour journal directory and naming scheme from QSettings :params testSettings: Override stand
structjour/time.py:39
↓ 3 callers
Method
createWorkbook
Create the workbook obj and give it all the data in the DataFrame. This copies almost verbatim each cell in the DataFrame to a cell i
structjour/layoutsheet.py:129
↓ 3 callers
Method
dailySumStyle
Create the shape and populate the daily Summary Form :params ws: The openpyxl Worksheet object :parmas tf: The TradeFormat ob
structjour/dailysumforms.py:168
↓ 3 callers
Method
doWeSave
(self)
structjour/view/sumcontrol.py:1038
↓ 3 callers
Function
excludeAfterHours
(string=False)
structjour/stock/utilities.py:161
↓ 3 callers
Method
filter_by_accounts
Adds a filter to a query on the TradeSum table
structjour/view/charts/chartdatabase.py:173
↓ 3 callers
Method
filter_by_dates
(self, query=None)
structjour/view/charts/chartdatabase.py:157
↓ 3 callers
Method
filter_by_side
(self, query=None)
structjour/view/charts/chartdatabase.py:93
↓ 3 callers
Method
filter_by_symbols
(self, query=None)
structjour/view/charts/chartdatabase.py:79
↓ 3 callers
Method
findByTime
If start is not given, return all trades from the given date or [] If start is given, return a single trade :params date: st
structjour/models/trademodels.py:129
↓ 3 callers
Function
findFilesSinceMonth
Collect the all files in the since daDate in the journal directory that match fn. Relies on the naming scheme saved in settings :fn: A fi
structjour/statements/findfiles.py:238
↓ 3 callers
Function
formatDate
(daDate, frmt='%Y%m%d')
structjour/statements/statementcrud.py:40
↓ 3 callers
Method
getColsByTabid
html statments and all trade type statements are no longer supported. But leaving the column information here. Using the tabl
structjour/statements/ibstatement.py:764
↓ 3 callers
Method
getDistinctStrats
Get a list of the strategies that are in use and the number of trades that use them. :return: A python list of tuples (name, count).
structjour/models/trademodels.py:257
↓ 3 callers
Method
getDistinctStratsQuery
(cls)
structjour/models/trademodels.py:266
↓ 3 callers
Method
getFrame
Retrieve the rows between (fid[0], fid[1]) in df :fid: A section identifier like ('BOF', 'EOF')
structjour/statements/ibstatement.py:636
↓ 3 callers
Method
getNumTicketsForDaySA
Queries the database to get the count of transactions recorded from a single day. By default will retrieve the tickets from all accou
structjour/statements/ibstatementdb.py:351
↓ 3 callers
Method
getOutdir
Get the outdir based on self.d
structjour/utilities/synchronizesavedstuff.py:120
↓ 3 callers
Function
getPrevTuesWed
Utility method to get a probable market open day prior to td. The least likely closed days are Tuesday and Wednesday. This will occassionally
test/test_mybarchart.py:37
↓ 3 callers
Method
getPrice
(self, price=None, long=True)
structjour/utilities/rtg.py:217
↓ 3 callers
Method
getQuote
(self, id=-1, name='')
structjour/inspiration/load.py:51
↓ 3 callers
Method
getRandomFuture
Get a time that is in the future a random amount of seconds from earliset
structjour/utilities/rtg.py:264
↓ 3 callers
Method
getShares
Utility to get the number of shares in this Trade. Each TradeObject object represents a single trade, or the part of a trade that hap
structjour/thetradeobject.py:561
↓ 3 callers
Method
getTradeCount
(self)
structjour/statements/statementcrud.py:278
↓ 3 callers
Method
getTradeSumById
(self, tid)
structjour/statements/dbdoctor.py:165
↓ 3 callers
Method
getTradeSummariesSA
Get the TradeSummaries as list of dict, each element is a transaction from the trade. Combine info from the related tables into Trade
structjour/statements/ibstatementdb.py:939
↓ 3 callers
Method
getTradesBySumId
(self, tsid)
structjour/statements/dbdoctor.py:137
↓ 3 callers
Method
getUncoveredDaysSA
Get Market days between beg and end for which we are not covered by a statement saved to the db. Paramaters: :params account
structjour/statements/ibstatementdb.py:1062
↓ 3 callers
Method
get_intraday
(self, symbol, start=None, end=None, minutes=5, showUrl=False)
structjour/stock/apichooser.py:197
↓ 3 callers
Method
initialize
Initialize the inputs and outs
structjour/view/runtrade.py:97
↓ 3 callers
Method
loadImageFromFile
Load the image named name into the QLable widget widg. Loads a default image if name does not exist. Used to initialize the form.
structjour/view/sumcontrol.py:344
↓ 3 callers
Method
loadQuotes
This is a one-off to load the quotes in the inspiration.inspire.Inspire class. Its a one-off becasue we have to seperate 2 fields fro
structjour/models/inspiremodel.py:45
↓ 3 callers
Method
loadStrategies
Load the strategy combo box from the db
structjour/view/stratcontrol.py:233
↓ 3 callers
Method
loadStrategies
Load strategies from database into the strategy Combobox. If the tto stored strategy is not in the db, then add it too. Call lf.setSt
structjour/view/sumcontrol.py:935
↓ 3 callers
Method
mstkSumStyle
Create the shape and stye for the Mistake summary form, populate the static values. The rest is done elsewhere including formulas (wi
structjour/dailysumforms.py:118
↓ 3 callers
Method
processStatementSA
Processs the trade, positions, and covered tables using the Trades table and the OpenPositions table.
structjour/statements/ibstatementdb.py:845
↓ 3 callers
Function
registerTrades
(wb, theDate)
structjour/discipline/disciplined.py:509
↓ 3 callers
Method
removeImage1
(self, strat)
structjour/strategy/strategycrud.py:130
↓ 3 callers
Method
removeImage2
(self, strat)
structjour/strategy/strategycrud.py:133
↓ 3 callers
Method
removeNote
(self, date=None)
structjour/statements/dailynotescrud.py:94
↓ 3 callers
Method
runDBInput
Get the trades from daDate in the DB and process the trades
structjour/view/runtrade.py:159
↓ 3 callers
Method
runQuery
(self)
structjour/stats/sqlfilter.py:55
↓ 3 callers
Function
runSummaries
This script creates the tto object for each trade in the input file and appends it to a list It also creates a generic name for assoiated ima
structjour/thetradeobject.py:876
↓ 3 callers
Method
setDailyPnL
Set the Pnl widget with the daily profit. The profit can be set for one account or all accounts in file settings
structjour/view/sumcontrol.py:374
↓ 3 callers
Function
setLimitReached
(token, resetTime, settings=None)
structjour/stock/utilities.py:44
↓ 3 callers
Method
setMstkVals
Set mstkval and mstknote in self.ts :params key: The current trade name is the key found in the tradeList Combo box :params v
structjour/view/layoutforms.py:471
↓ 3 callers
Method
setNote
Commit or update the dailyNotes db table with self.date and note A redundant method that was in the api
structjour/statements/dailynotescrud.py:85
↓ 3 callers
Method
setStartEndInactive
The checkboxes (30 60, 90 days) are short cuts to fill in the start and end dates. Un checking all three will also trigger this metho
structjour/view/statisticshubcontrol.py:177
↓ 3 callers
Method
setStartEndTimes
Retrieve the dates from the widgets and place them in the self.cud dict. If they are not ordered (start > end), set the dict to None
structjour/view/statisticshubcontrol.py:208
↓ 3 callers
Method
setXMonths
(self, months)
structjour/view/statisticshubcontrol.py:158
↓ 3 callers
Method
start
(self)
structjour/view/disciplinedcontrol.py:60
↓ 3 callers
Method
styleTop
Style the table, and the top bit. Here we style the table and the things above it. The table data is already there. Above the table a
structjour/layoutsheet.py:155
↓ 3 callers
Method
unifyDateFormat
Ib sends back differnt formats from different files. All statement processing should call this method.
structjour/statements/ibstatement.py:231
↓ 3 callers
Method
updateAvgBalPlOC
DB update ib_trades for average, balance, PnL and OpenClose :params atrade: A dict that includes the key 'id' for id value.
structjour/statements/ibstatementdb.py:596
↓ 3 callers
Method
warnChartError
(self)
structjour/view/sumcontrol.py:668
↓ 2 callers
Method
__init__
(self, port, cid, host)
structjour/stock/myib.py:176
↓ 2 callers
Method
_checkPaths
Check the value of self.inpathfile, self.inpathfile2 (if the entry exists), and self.outdir for existance. Note that this is called b
structjour/journalfiles.py:144
↓ 2 callers
Method
add
(self, lname='', subject='', name='', who='', quote='')
structjour/inspiration/load.py:48
↓ 2 callers
Method
addStrategy
(cls, name, preferred=True)
structjour/models/strategymodels.py:93
↓ 2 callers
Method
addTag
Use only this method to add tags in order to format them uniformly :params session: :params tag: A Tags object
structjour/models/trademodels.py:61
↓ 2 callers
Function
advanceMonth
Take a date and advance a number of months up to 12. The returned date's day is the same as the argument's unless it is >= 28 when it returns
structjour/utilities/util.py:61
↓ 2 callers
Method
appendCols
HACK ALERT: adding columns to the the 'final' list of cols. Not ready to add these cols to FinReqCol
structjour/definetrades.py:89
↓ 2 callers
Method
askAboutSwingTrades
placeholder
structjour/statements/dasstatement.py:446
↓ 2 callers
Method
combineOrdersByTime
There are a few seperate orders for equities that share the same order time. These cannot have an assigned share balance because ther
structjour/statements/ibstatement.py:445
↓ 2 callers
Method
createTables
(self)
structjour/strategy/strategycrud.py:49
↓ 2 callers
Method
deleteById
(cls, tid)
structjour/models/trademodels.py:414
↓ 2 callers
Method
deleteTradeById
(self, tid)
structjour/statements/dbdoctor.py:131
↓ 2 callers
Method
deleteTradeSumById
(self, tid)
structjour/statements/dbdoctor.py:134
↓ 2 callers
Method
dictToTable
Create an html table that displays the dict d :d: A dict or a list of dict of the same type
structjour/view/duplicatecontrol.py:115
↓ 2 callers
Method
diffTarget
Triggered when the targ value changes, set targ, tarDiff and rr. Then store vals in tto
structjour/view/sumcontrol.py:1203
↓ 2 callers
Method
doDups
Search for duplicate trades and determine which records from ib_trades and trade_sum should be removed. This is called in StatementDb
structjour/statements/dbdoctor.py:60
↓ 2 callers
Method
doUpdate
(cls)
structjour/migrations/_0003_model_trade_sum_dataonly.py:51
↓ 2 callers
Method
exportExcel
Export to excel the trade tables, trade summaries, and daily forms
structjour/view/exportexcel.py:322
↓ 2 callers
Method
figureAPL
Figure the average price and the PL. Although DAS has PL, it often does not match the figures -- or IB
structjour/statements/dasstatement.py:303
↓ 2 callers
Method
figureBAPL
Figure Balance, Average price and PL :params tt: Trades table from statement :params tos: Positions table from statement
structjour/statements/ibstatement.py:90
↓ 2 callers
Method
fillAvailBackups
(self)
structjour/view/backupcontrol.py:78
↓ 2 callers
Method
filter_by_strategies
(self, query=None)
structjour/view/charts/chartdatabase.py:120
← previous
next →
101–200 of 1,304, ranked by callers