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
↓ 274 callers
Method
connect
Create the engine and bind the session to a database :params new_session: Bind to a new session if True :params con_str: Use
structjour/models/meta.py:63
↓ 84 callers
Method
query
(self, table, wheres=None, fields=None)
structjour/stats/sqlfilter.py:30
↓ 60 callers
Method
error
Overriden method to return all errors to us
structjour/stock/myib.py:142
↓ 55 callers
Method
close
(cls)
structjour/models/meta.py:90
↓ 34 callers
Method
add
:raises: ValueError if all arguments are not supplied
structjour/models/inspiremodel.py:90
↓ 32 callers
Function
isNumeric
Not to be confused with str.isnumeric. Takes an arg or a list and tests if all members are numeric types and not NAN.
structjour/utilities/util.py:97
↓ 29 callers
Function
qtime2pd
Return a pandas Timestamp from a QDateTime
structjour/stock/utilities.py:78
↓ 26 callers
Method
addNamedStyle
Register named style if it is not lready and add the style to the dict self.styles :params ns: The NamedStyle :params strNs:
structjour/tradestyle.py:495
↓ 25 callers
Method
clear
(cls)
structjour/models/inspiremodel.py:82
↓ 19 callers
Method
getKey
(self, api)
structjour/stock/utilities.py:329
↓ 17 callers
Method
restore
(self, theDir=None)
structjour/utilities/backup.py:225
↓ 16 callers
Function
pd2qtime
Return a QDateTime or a QDate from a time object of Timestamp :qdate: Return QDateTime if False (by default) and QDate if True
structjour/stock/utilities.py:96
↓ 15 callers
Method
setupUi
(self, Dialog)
structjour/view/forms/getdate.py:14
↓ 14 callers
Method
addStrategy
(self, name, preferred=True)
structjour/strategy/strategycrud.py:66
↓ 14 callers
Function
getFloat
(val)
structjour/statements/statementcrud.py:48
↓ 14 callers
Method
save
Save wb as an excel file. If Permission Denied error is thrown, try renaming it.
structjour/layoutsheet.py:362
↓ 13 callers
Function
c
Translates numerical coordinates as tuplets to excels string addresses e.g., (1,1) returns 'A1' :params icell: The cell to translate.
structjour/tradestyle.py:75
↓ 13 callers
Method
delete
(cls, id=-1, obj=None)
structjour/models/inspiremodel.py:133
↓ 13 callers
Method
getStatement
Get the trades from a single day. This is the default and corresponds tradeSummaries with numbered trades from a single day. Create a
structjour/statements/ibstatementdb.py:1030
↓ 12 callers
Method
createDf
Creates a new DataFrame with the length numRow. Each cell is filled with empty string :param cols: An array or DataFrame to use as t
structjour/dfutil.py:62
↓ 12 callers
Function
fc
formatCurrency
structjour/utilities/util.py:85
↓ 12 callers
Method
getDirectory
Get the location of the current input directory. This should correspond to the values found in selected date, input file type, journa
structjour/view/sumcontrol.py:1354
↓ 12 callers
Method
markDataChanged
(self)
structjour/view/sumcontrol.py:227
↓ 12 callers
Method
plot
(self)
structjour/view/charts/chartbase.py:37
↓ 12 callers
Method
setCbLabel
(self, val, widg)
structjour/view/chartcontrol.py:389
↓ 11 callers
Method
backup
(self)
structjour/utilities/backup.py:221
↓ 11 callers
Method
openIBStatement
Open an IB Statement
structjour/statements/ibstatement.py:177
↓ 11 callers
Method
remove_tag
Remove the associataion between the given tag and TradeSums :params tag_id: int. Either tag_id or tag_name must have a value or metho
structjour/models/trademodels.py:199
↓ 10 callers
Method
processDBTrades
Run the methods to create the new DataFrame and fill in the data for the new trade- centric (as opposed to transaction-centric, trade
structjour/definetrades.py:100
↓ 9 callers
Method
createAll
(cls)
structjour/models/meta.py:99
↓ 9 callers
Method
getNote
Retrieve the object for the record associated with date. :return: None if the record does not exist.
structjour/models/dailynotemodel.py:67
↓ 8 callers
Method
checkRequiredInputFields
Checks that dframe has the fields in the array requiredFields. Also checks that there are no duplicate fields Returns True on success
structjour/dfutil.py:40
↓ 8 callers
Method
getChartData
Get the chart data from the tradeObject :params key: Trade name from the tradeList widget :params ckey: The widget name of th
structjour/view/layoutforms.py:322
↓ 8 callers
Method
getStrategy
Retrieves the current strategy from self.ts
structjour/view/layoutforms.py:501
↓ 8 callers
Method
getTags
select *
structjour/models/trademodels.py:55
↓ 8 callers
Method
getTrades
Create an alternate dataFrame by ticket. For large share sizes this may have dramatically fewer transactions. :params listdf:
structjour/statements/dasstatement.py:637
↓ 8 callers
Method
sortIt
Color and order the api pref after done editing
structjour/view/sapicontrol.py:308
↓ 7 callers
Method
addStartTimeDB
Add the start time to the new column labeled Start or frc.start. Each transaction whthin a trade will share a start time. :pa
structjour/definetrades.py:130
↓ 7 callers
Method
getDirectory
Put together the settings for scheme (realized here), journal and theDate to get the indir
structjour/view/filesetcontrol.py:460
↓ 7 callers
Method
getId
Get the id of the strategy named name or return None if not found
structjour/models/strategymodels.py:82
↓ 7 callers
Method
getLinks
Get links for the strategey 'name' :return: list<string>: Get a list of urls
structjour/strategy/strategycrud.py:96
↓ 7 callers
Function
getStatementType
Determine if infile is a statement. If it is return a tuple (data, type) TODO: Not doing what I said... If it is a DAS statement, determine i
structjour/statements/statement.py:39
↓ 7 callers
Method
setChartData
Store the chart data in the trade object :params key: Trade name from the tradeList :params data: a list or list of lists. Ea
structjour/view/layoutforms.py:375
↓ 7 callers
Method
setLink
(self, name, url)
structjour/strategy/strategycrud.py:93
↓ 6 callers
Method
addRows
Adds numRow rows to the end of the DataFrame object dframe' :params dframe: A DataFrame to increase in size. :params numRow:
structjour/dfutil.py:86
↓ 6 callers
Method
addTradeIndex
Labels and numbers the trades by populating the TIndex column. 'Trade 1' for example includes the transactions between the initial pu
structjour/definetrades.py:161
↓ 6 callers
Method
appendOrRemoveAPI
(self, api, b)
structjour/view/sapicontrol.py:201
↓ 6 callers
Method
getById
(cls, tid, new_session=True)
structjour/models/trademodels.py:424
↓ 6 callers
Method
getKey
(cls, api, keyonly=True)
structjour/models/api_keymodel.py:37
↓ 6 callers
Method
getOutdir
Return the location of outdir
structjour/view/sumcontrol.py:1384
↓ 6 callers
Method
getPreferred
(self, pref=1)
structjour/strategy/strategycrud.py:84
↓ 6 callers
Method
justtestit
(self, s, a, b, t)
test/test_unbalancedcontrol.py:56
↓ 6 callers
Method
loadFromDate
Callback when dateEdit is changed. Gather the settings and locate what input files exist. Enable/disable radio buttons to choose IB o
structjour/view/sumcontrol.py:1056
↓ 6 callers
Method
mergeStuff
Perform a merge cell :params ws: The Worksheet to place the merged cells. :params begin: The top left cell as a tuple of ints
structjour/tradestyle.py:507
↓ 6 callers
Method
setDescription
(self, name, desc)
structjour/strategy/strategycrud.py:143
↓ 6 callers
Method
setImage1
:params strat: str: name of strat :params name: str: the image file string
structjour/strategy/strategycrud.py:120
↓ 6 callers
Method
setStrategy
Sets strategy in self.ts to val
structjour/view/layoutforms.py:497
↓ 6 callers
Method
updateKey
(self, api, key)
structjour/stock/utilities.py:326
↓ 5 callers
Method
addTradePL
Add a trade summary P/L. That is total the transaction P/L and write a summary P/L for the trade in the c.sum column
structjour/definetrades.py:191
↓ 5 callers
Method
adjustSizeByHeight
Adjust size to keep the aspect ratio the same as determined by self.numCells and self.pixPerCell
structjour/xlimage.py:57
↓ 5 callers
Method
commitNote
Save or update the db file for the notes field. If no note is given. will retrieve the text from the qt dailyNotes widget. Use setNo
structjour/statements/dailynotescrud.py:73
↓ 5 callers
Method
commitNote
(cls, note=None, daDate=None)
structjour/models/dailynotemodel.py:47
↓ 5 callers
Method
getImage1
(self, strat)
structjour/strategy/strategycrud.py:114
↓ 5 callers
Method
getNamesAndProfits
:params daDate: A date string in the form yyyymmdd as it is held in the db :return: Two OrderedDict with keys for the account alias n
structjour/models/trademodels.py:239
↓ 5 callers
Method
getStrategies
(self)
structjour/strategy/strategycrud.py:78
↓ 5 callers
Method
gotTrades
From the text in the infileEdit box, determine if we have trades in the db. We can tell because the first token is an int sho
structjour/view/runtrade.py:179
↓ 5 callers
Method
mostRecent
(self)
structjour/utilities/backup.py:233
↓ 5 callers
Function
movingAverage
Creates a dictionary of moving averages based settings values. All window values in chartSettings will be processed. Returns a dict of MA: SM
structjour/stock/utilities.py:168
↓ 5 callers
Method
populateTags
Populate the tags widget with all tags in the db and, if tsum_id is given, select the tags for the selected trade
structjour/view/sumcontrol.py:396
↓ 5 callers
Method
populateXLDailyFormulas
Helper method for export to excel. Populate the excel formulas in the daily summary forms. The formulas are in self.ts and the inform
structjour/view/exportexcel.py:202
↓ 5 callers
Method
reinitializeTradeTables
This is intended for testing code only. Be sure the db either has a backup or is initialized to a test db.
structjour/statements/ibstatementdb.py:95
↓ 5 callers
Method
runDialog
Top level script for this form. Populate the widgets.
structjour/view/dailycontrol.py:93
↓ 5 callers
Method
runTtoSummaries
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 assoi
structjour/view/layoutforms.py:222
↓ 5 callers
Method
saveSomeTestFiles
Create DAS export like random trades.csv files for testing purposes :params dates: Create one file for each date. Date will be append
structjour/utilities/rtg.py:78
↓ 5 callers
Method
setClean
Set clean in self.ts to b. The clean value is used to determine if there is user input to maintain in the mistake note/mistake val.
structjour/view/layoutforms.py:462
↓ 5 callers
Method
setImage2
(self, strat, name)
structjour/strategy/strategycrud.py:127
↓ 5 callers
Function
style_range
Apply styles to a range of cells as if they were a single cell. This function is mostly unchanged from StackOverflow, where it was gotten fro
structjour/tradestyle.py:35
↓ 4 callers
Method
addKey
(self, api, key='')
structjour/models/api_keymodel.py:50
↓ 4 callers
Method
addTradeDurationDB
Get a time delta beween the time of the first and last transaction. Place it in the c.dur column on the last transaction of the trade
structjour/definetrades.py:232
↓ 4 callers
Method
addTradeSummariesSA
Create DB entries in trade_sum and its relations they do not already exist
structjour/statements/ibstatementdb.py:247
↓ 4 callers
Method
addWhere
(self, where)
structjour/stats/sqlfilter.py:52
↓ 4 callers
Method
apiChooserList
Given the current list of apis as av, bc, fh and ib, determine if the given api will likely return data for the given times.
structjour/stock/apichooser.py:67
↓ 4 callers
Function
checkForIbapi
If the ibapi is not installed or available, disable its use.
structjour/stock/utilities.py:399
↓ 4 callers
Function
clearTables
(db)
structjour/stock/utilities.py:283
↓ 4 callers
Function
createDirs
In the directory theDir, create 1 month of directories, one for each weekday. Use the date theDate to and the format given to create the name
structjour/time.py:61
↓ 4 callers
Method
dbDefault
(self, b)
structjour/view/sumcontrol.py:1014
↓ 4 callers
Function
dummyName
This is a method function for use in developement. It will probably move up in the heirarchy to the inclusive program. Instructive to see
structjour/stock/graphstuff.py:46
↓ 4 callers
Method
filterHubStrategy
HACK ALERT:The access to the chartData methods uses an arbitrary reference to charts[0]. Filter the strategies and numbers
structjour/view/statisticshubcontrol.py:228
↓ 4 callers
Method
fixNumericTypes
In the DataFrame t, change some types from str to numeric. :params t: DataFrame, a Trades or TRNT table from an IbStatement
structjour/statements/ibstatement.py:211
↓ 4 callers
Method
formatDate
Format the date into a string for uniform DB format
structjour/statements/ibstatementdb.py:132
↓ 4 callers
Method
getDescription
Returns Description object or None
structjour/strategy/strategycrud.py:136
↓ 4 callers
Function
getDirectory
Get the directory in the journal subdirs that represent daDate. Relies on the naming scheme saved in ff.settings
structjour/statements/findfiles.py:136
↓ 4 callers
Method
getEntries
The data structure is: [price, time, share, pl, diff, entryOrExit]. Share is positive for buy, negative for sell. :params key
structjour/view/layoutforms.py:298
↓ 4 callers
Method
getFormatGraphArray
Seperates self.data into two arrays padded with 0s, one for negative values and one for positive.
structjour/view/charts/chartdatabase.py:338
↓ 4 callers
Function
getHeaders
()
structjour/stock/mytiingo.py:34
↓ 4 callers
Method
getImage2
(self, strat)
structjour/strategy/strategycrud.py:117
↓ 4 callers
Function
getLimitReached
(token, settings=None)
structjour/stock/utilities.py:58
↓ 4 callers
Method
getNote
Retrieve the notes field for the db entry for the date associated with this object. The date can be given as an argument or retrieved
structjour/statements/dailynotescrud.py:105
↓ 4 callers
Method
getQuote
Get a quote by id or name :return: list :raises: ValueError if neither id or name are supplied
structjour/models/inspiremodel.py:112
↓ 4 callers
Method
getStrategy
(cls, name=None, sid=None)
structjour/models/strategymodels.py:107
next →
1–100 of 1,304, ranked by callers