MCPcopy Create free account

hub / github.com/MikePia/structjour / functions

Functions1,304 in github.com/MikePia/structjour

↓ 4 callersMethodgetTradeList
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 callersMethodgetrandom
Get a random quote.
structjour/inspiration/inspire.py:449
↓ 4 callersMethodinsertTradeSA
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 callersMethodopenIBStatementCSV
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 callersMethodpopulateXLMistakeForm
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 callersMethodremoveKey
(cls, api)
structjour/models/api_keymodel.py:67
↓ 4 callersMethodremoveLink
(self, name, url)
structjour/strategy/strategycrud.py:106
↓ 4 callersMethodsetTimeFrame
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 callersMethodshowTrades
(self)
structjour/view/duplicatecontrol.py:182
↓ 4 callersMethodstopLoss
Set the stopDiff to the difference between the stoploss and the first entry, then call rrCalc
structjour/view/sumcontrol.py:1231
↓ 4 callersMethodverifyAvailableCols
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 callersMethodaddFinReqCol
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 callersMethodaddSource
(cls, name, id=None)
structjour/models/strategymodels.py:53
↓ 3 callersMethodaddTradeNameDB
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 callersMethodapiChooser
Get a data method as set in self.api :return the method
structjour/stock/apichooser.py:177
↓ 3 callersMethodappend_tag
(cls, trade_sum_id, tag_name=None, tag_id=None)
structjour/models/trademodels.py:150
↓ 3 callersFunctionautoGenCreateDirs
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 callersMethodchartIntervalChanged
Implementation for signals from interval widgets
structjour/view/sumcontrol.py:442
↓ 3 callersFunctioncheckDateDir
Get the date from the path
structjour/statements/findfiles.py:41
↓ 3 callersMethodcheckVersion
(cls, mv, v)
structjour/migrations/_0002_structjour_statement_ibstatementdb.py:75
↓ 3 callersMethodclearTables
(self)
test/test_ibstatementdb.py:216
↓ 3 callersMethodconnect
(cls)
structjour/migrations/_0002_structjour_statement_ibstatementdb.py:67
↓ 3 callersMethodcreateDirs
Create the sub directories in the journal directory
structjour/view/createdirscontrol.py:78
↓ 3 callersFunctioncreateDirsStructjour
Wrapper to createDirs take care of the structjour journal directory and naming scheme from QSettings :params testSettings: Override stand
structjour/time.py:39
↓ 3 callersMethodcreateWorkbook
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 callersMethoddailySumStyle
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 callersMethoddoWeSave
(self)
structjour/view/sumcontrol.py:1038
↓ 3 callersFunctionexcludeAfterHours
(string=False)
structjour/stock/utilities.py:161
↓ 3 callersMethodfilter_by_accounts
Adds a filter to a query on the TradeSum table
structjour/view/charts/chartdatabase.py:173
↓ 3 callersMethodfilter_by_dates
(self, query=None)
structjour/view/charts/chartdatabase.py:157
↓ 3 callersMethodfilter_by_side
(self, query=None)
structjour/view/charts/chartdatabase.py:93
↓ 3 callersMethodfilter_by_symbols
(self, query=None)
structjour/view/charts/chartdatabase.py:79
↓ 3 callersMethodfindByTime
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 callersFunctionfindFilesSinceMonth
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 callersFunctionformatDate
(daDate, frmt='%Y%m%d')
structjour/statements/statementcrud.py:40
↓ 3 callersMethodgetColsByTabid
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 callersMethodgetDistinctStrats
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 callersMethodgetDistinctStratsQuery
(cls)
structjour/models/trademodels.py:266
↓ 3 callersMethodgetFrame
Retrieve the rows between (fid[0], fid[1]) in df :fid: A section identifier like ('BOF', 'EOF')
structjour/statements/ibstatement.py:636
↓ 3 callersMethodgetNumTicketsForDaySA
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 callersMethodgetOutdir
Get the outdir based on self.d
structjour/utilities/synchronizesavedstuff.py:120
↓ 3 callersFunctiongetPrevTuesWed
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 callersMethodgetPrice
(self, price=None, long=True)
structjour/utilities/rtg.py:217
↓ 3 callersMethodgetQuote
(self, id=-1, name='')
structjour/inspiration/load.py:51
↓ 3 callersMethodgetRandomFuture
Get a time that is in the future a random amount of seconds from earliset
structjour/utilities/rtg.py:264
↓ 3 callersMethodgetShares
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 callersMethodgetTradeCount
(self)
structjour/statements/statementcrud.py:278
↓ 3 callersMethodgetTradeSumById
(self, tid)
structjour/statements/dbdoctor.py:165
↓ 3 callersMethodgetTradeSummariesSA
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 callersMethodgetTradesBySumId
(self, tsid)
structjour/statements/dbdoctor.py:137
↓ 3 callersMethodgetUncoveredDaysSA
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 callersMethodget_intraday
(self, symbol, start=None, end=None, minutes=5, showUrl=False)
structjour/stock/apichooser.py:197
↓ 3 callersMethodinitialize
Initialize the inputs and outs
structjour/view/runtrade.py:97
↓ 3 callersMethodloadImageFromFile
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 callersMethodloadQuotes
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 callersMethodloadStrategies
Load the strategy combo box from the db
structjour/view/stratcontrol.py:233
↓ 3 callersMethodloadStrategies
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 callersMethodmstkSumStyle
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 callersMethodprocessStatementSA
Processs the trade, positions, and covered tables using the Trades table and the OpenPositions table.
structjour/statements/ibstatementdb.py:845
↓ 3 callersFunctionregisterTrades
(wb, theDate)
structjour/discipline/disciplined.py:509
↓ 3 callersMethodremoveImage1
(self, strat)
structjour/strategy/strategycrud.py:130
↓ 3 callersMethodremoveImage2
(self, strat)
structjour/strategy/strategycrud.py:133
↓ 3 callersMethodremoveNote
(self, date=None)
structjour/statements/dailynotescrud.py:94
↓ 3 callersMethodrunDBInput
Get the trades from daDate in the DB and process the trades
structjour/view/runtrade.py:159
↓ 3 callersMethodrunQuery
(self)
structjour/stats/sqlfilter.py:55
↓ 3 callersFunctionrunSummaries
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 callersMethodsetDailyPnL
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 callersFunctionsetLimitReached
(token, resetTime, settings=None)
structjour/stock/utilities.py:44
↓ 3 callersMethodsetMstkVals
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 callersMethodsetNote
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 callersMethodsetStartEndInactive
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 callersMethodsetStartEndTimes
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 callersMethodsetXMonths
(self, months)
structjour/view/statisticshubcontrol.py:158
↓ 3 callersMethodstart
(self)
structjour/view/disciplinedcontrol.py:60
↓ 3 callersMethodstyleTop
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 callersMethodunifyDateFormat
Ib sends back differnt formats from different files. All statement processing should call this method.
structjour/statements/ibstatement.py:231
↓ 3 callersMethodupdateAvgBalPlOC
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 callersMethodwarnChartError
(self)
structjour/view/sumcontrol.py:668
↓ 2 callersMethod__init__
(self, port, cid, host)
structjour/stock/myib.py:176
↓ 2 callersMethod_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 callersMethodadd
(self, lname='', subject='', name='', who='', quote='')
structjour/inspiration/load.py:48
↓ 2 callersMethodaddStrategy
(cls, name, preferred=True)
structjour/models/strategymodels.py:93
↓ 2 callersMethodaddTag
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 callersFunctionadvanceMonth
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 callersMethodappendCols
HACK ALERT: adding columns to the the 'final' list of cols. Not ready to add these cols to FinReqCol
structjour/definetrades.py:89
↓ 2 callersMethodaskAboutSwingTrades
placeholder
structjour/statements/dasstatement.py:446
↓ 2 callersMethodcombineOrdersByTime
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 callersMethodcreateTables
(self)
structjour/strategy/strategycrud.py:49
↓ 2 callersMethoddeleteById
(cls, tid)
structjour/models/trademodels.py:414
↓ 2 callersMethoddeleteTradeById
(self, tid)
structjour/statements/dbdoctor.py:131
↓ 2 callersMethoddeleteTradeSumById
(self, tid)
structjour/statements/dbdoctor.py:134
↓ 2 callersMethoddictToTable
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 callersMethoddiffTarget
Triggered when the targ value changes, set targ, tarDiff and rr. Then store vals in tto
structjour/view/sumcontrol.py:1203
↓ 2 callersMethoddoDups
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 callersMethoddoUpdate
(cls)
structjour/migrations/_0003_model_trade_sum_dataonly.py:51
↓ 2 callersMethodexportExcel
Export to excel the trade tables, trade summaries, and daily forms
structjour/view/exportexcel.py:322
↓ 2 callersMethodfigureAPL
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 callersMethodfigureBAPL
Figure Balance, Average price and PL :params tt: Trades table from statement :params tos: Positions table from statement
structjour/statements/ibstatement.py:90
↓ 2 callersMethodfillAvailBackups
(self)
structjour/view/backupcontrol.py:78
↓ 2 callersMethodfilter_by_strategies
(self, query=None)
structjour/view/charts/chartdatabase.py:120
← previousnext →101–200 of 1,304, ranked by callers