Selasa, 27 Juni 2017

[smf_addin] Digest Number 4072[1 Attachment]

13 Messages

Digest #4072
3b
3d
3e
4c
Re: Code for most reliable PEG ratio? by "Randy Harmelink" rharmelink
5a
Cookies by bob_15861586
5b
Re: Cookies by "Randy Harmelink" rharmelink

Messages

Mon Jun 26, 2017 7:27 pm (PDT) . Posted by:

"Randy Harmelink" rharmelink

Because it's a beta version, I'm not listing it on the pages of the web
site. Only here in messages, where I'm more likely to get feedback on the
changes.

I've gone back and forth with myself several times whether I should just
post a new ZIP file on the main page with each change. Or maybe have two
ZIP files on the main page, one with more frequent updates like this one
has.

One problem is that early on I was changing parameters, so I didn't
necessarily want to put things in general use that might change.

I just wish I could find more time to spend on updates...

On Mon, Jun 26, 2017 at 7:00 PM, earladamy@
​...
wrote:

>
> Randy, I am trying to stay on top of the revisions. I see reference to the
> new smf file dated June 9 located at
>
> http://ogres-crypt.com/SMF/ Works-In-Progress/RCH_Stock_
> Market_Functions.xla
> <http://ogres-crypt.com/SMF/Works-In-Progress/RCH_Stock_Market_Functions.xla>
>
> I downloaded that file; however when I go to
>
> http://ogres-crypt.com/SMF/Works-In-Progress/
>
> I do not see any of the RCH_Stock_Market_Functions.xla files listed. Is
> there another folder I need to check for various versions?
>
> Earl Adamy
>

Tue Jun 27, 2017 5:19 pm (PDT) . Posted by:

eadamy

Randy, you have been beyond generous with your time. I have no doubt that your research and coding skills have saved the bacon of many Yahoo users of which I am but one.

It would be wonderful to have a folder for the betas with a dated zip file for each of the most recent updates. That would give us the opportunity to manage and try the betas as appropriate to our needs.

I used the 5/23? without issues until I suddenly found that the dividends were being multiplied. The most recent beta fixed that.

Earl Adamy

Tue Jun 27, 2017 5:29 am (PDT) . Posted by:

fran0591

Sorry about the smfConvertData() suffixes, that's been a bug in my brain and nothing's wrong with the code.

Regarding Application.Min() etc.: Whether to use it or not depends on total code runtime, number of calls for that function and comprehensibility desires of code. I'm all for speed, but if the performance hit is negligible, I'm all for compact, easy VBA code.

I've just written some code to benchmark different procedures. 5 mil iterations per run, six runs each.
If you're interested I can also upload the whole workbook. Here's the results and code essentials:

Procedure iteration [µs] Application.Min 2,6706 With Application _ .Min 2,6168 App.Min 2,6252 With App _ .Min 2,6149 Application.Worksheetfunction.Min 1,1103 With Application.Worksheetfunction _ .Min 0,9749 Wf.Min 0,9746 With Wf _ .Min 0,9743 IIf(A < B) 0,0756 Select Case A Case Is < B 0,0122 If a < b Then Else 0,0103

Dim lngA As Long, lngB As Long, lngC As Long
Set App = Application: Set Wf = App.WorksheetFunction

dblTime = MicroTimer
With ... (where applicable)
For i = 1 To lngIterations
lngC = ...
Next i
End With (where applicable)
dblTime = MicroTimer - dblTime

Application.Min(lngA, lngB)

With Application
.Min(lngA, lngB)

App.Min(lngA, lngB)

With App
.Min(lngA, lngB)

Application.WorksheetFunction.Min(lngA, lngB)

With Application.WorksheetFunction
.Min(lngA, lngB)

Wf.Min(lngA, lngB)

With Wf
.Min(lngA, lngB)

IIf(lngA <= lngB, lngA, lngB)

Select Case lngA
Case Is < lngB: lngC = lngA
Case Else: lngC = lngB
End Select

If lngA < lngB Then lngC = lngA Else lngC = lngB
Attachment(s) from
1 of 1 Photo(s)

Tue Jun 27, 2017 10:50 am (PDT) . Posted by:

e_bartsch

Randy:


For whatever reason, RCHGetYahooQuotes and smfGetOptionQuotes are returning either no information or "Error." Is it just my system? It started happening yesterday, during the trading day. Seemed like it resolved after hours. I've powered up the spreadsheet on two different networks using to different machines.


I've installed the latest add-in and ensured it is working. Other functions, such as RCHGetElementNumber are presently working.


Thanks.


Eric

Tue Jun 27, 2017 12:25 pm (PDT) . Posted by:

"Randy Harmelink" rharmelink

Just tried this and it worked fine for me:

=smfGetOptionQuotes("NUE 6/30 2017 $57.00 Call","b",,"Y")

These days, I prefer using Barchart as my source of option quotes, but
they've not been without problems.

On Tue, Jun 27, 2017 at 10:49 AM, eabartsch@
​...
wrote:

> For whatever reason, RCHGetYahooQuotes and smfGetOptionQuotes are
> returning either no information or "Error." Is it just my system? It
> started happening yesterday, during the trading day. Seemed like it
> resolved after hours. I've powered up the spreadsheet on two different
> networks using to different machines.
>
> I've installed the latest add-in and ensured it is working. Other
> functions, such as RCHGetElementNumber are presently working.
>
>
>

Tue Jun 27, 2017 12:49 pm (PDT) . Posted by:

e_bartsch

Randy;


Thanks. The data just appeared in tact, after I've been doing recalcs over the past few hours. So, the problem must be on my end.


Is Barchart faster than =smfGetOptionQuotes? Is that a GetElement function, or does it have its own? I have a large spreadsheet, so anything I can do to speed it up is worth implementing.


As always, thanks much.


Eric

Tue Jun 27, 2017 1:35 pm (PDT) . Posted by:

"Randy Harmelink" rharmelink

If you're getting option quotes for different equities and different
expiration dates, Yahoo and Barchart will be about the same, generally
under a second. But if you getting option quotes for multiple strike prices
of the same equity and same expiration date, Barchart will be faster. Yahoo
has to go to the Internet for each individual contract. Barchart can get
all strike prices for a given equity and given expiration date.

For example:

=smfGetOptionQuotes("NUE 6/30 2017 $57.00 Call","b",,"Y")
=smfGetOptionQuotes("NUE 6/30 2017 $57.00 Call","b",,"B")

Both are delayed, but Yahoo currently returns $0.52 and Barchart returns
$0.61. According to the trading platform at my broker, the current bid
price is $0.46. The price (along with NUE) has been steadily dropping all
day. I'd guess Yahoo was a more current bid price...

Earlier when I tried the formulas, they were $0.62 and $0.68.

On Tue, Jun 27, 2017 at 12:49 PM, eabartsch@
​...
wrote:

> Thanks. The data just appeared in tact, after I've been doing recalcs
> over the past few hours. So, the problem must be on my end.
>
> Is Barchart faster than =smfGetOptionQuotes? Is that a GetElement
> function, or does it have its own? I have a large spreadsheet, so anything
> I can do to speed it up is worth implementing.
>
>
>

Tue Jun 27, 2017 2:00 pm (PDT) . Posted by:

"Randy Harmelink" rharmelink

Just checked on Barchart -- they say option quotes are delayed at least 30
minutes ad updated hourly, starting at 10:30 am EDT. So not a good source
for timely option quotes...

On Tue, Jun 27, 2017 at 12:49 PM, eabartsch@
​...
wrote:

> Is Barchart faster than =smfGetOptionQuotes? Is that a GetElement
> function, or does it have its own? I have a large spreadsheet, so anything
> I can do to speed it up is worth implementing.
>
>
>

Tue Jun 27, 2017 11:36 am (PDT) . Posted by:

pete_cook2001

I'm trying to figure out the best source for PEG ratios. When I use RCHgetyahooquotes r5 vs. any of several using RCHgetelementnumber I get wildly different results.



Can someone advise on the most reliable coding? I also want to get the industry PEG.



It's been several years since I first built my spreadsheet based on SMFaddin and I haven't kept up with all the developments.


Many thanks,
Peter

Tue Jun 27, 2017 12:02 pm (PDT) . Posted by:

pete_cook2001

I see that RCHgetyahooquotes is looking a the 5-year forward PEG. Are the RCHgetelementnumber values using trailing PEG, or a shorter-term forward look?


---In smf_addin@yahoogroups.com, <peterscottcook@...> wrote :

I'm trying to figure out the best source for PEG ratios. When I use RCHgetyahooquotes r5 vs. any of several using RCHgetelementnumber I get wildly different results.



Can someone advise on the most reliable coding? I also want to get the industry PEG.



It's been several years since I first built my spreadsheet based on SMFaddin and I haven't kept up with all the developments.


Many thanks,
Peter


Tue Jun 27, 2017 12:59 pm (PDT) . Posted by:

"Randy Harmelink" rharmelink

Mathematically, a 1-year PEG can be shown to be nonsensical. When you do
all of the reductions, it comes out to simply a change in EPS, without any
reference to stock price. But a $1 change in earnings is far different on a
$2 stock than a $100 stock.

As far as the RCHGetElementNumber() values, you'd have to check the source
of the data element to check their definitions and their data providers.
Keep in mind that the estimated 5-year growth comes from analysts, and each
provider of analyst data may cover a different set of analysts. So they
could vary significantly.

FinViz has a lot of data items available by industry group. For example,
PEG could be either:

=RCHGetTableCell("http://finviz.com/groups.ashx?g=industry&v=110&o=peg",6,">Home
Furnishing Stores<")
=RCHGetTableCell("http://finviz.com/groups.ashx?g=industry&v=110&o=peg
",8,"ind_homefurnishingstores")

You probably want to get your company PEG and industry PEG from the same
data source, so they are using the same definition of the metric and the
same group of analysts.

On Tue, Jun 27, 2017 at 12:02 PM, peterscottcook@
​...
wrote:

>
> I see that RCHgetyahooquotes is looking a the 5-year forward PEG. Are the
> RCHgetelementnumber values using trailing PEG, or a shorter-term forward
> look?
>
> ---In smf_addin@yahoogroups.com, <peterscottcook@...> wrote :
>
> I'm trying to figure out the best source for PEG ratios. When I use
> RCHgetyahooquotes r5 vs. any of several using RCHgetelementnumber I get
> wildly different results.
>
> Can someone advise on the most reliable coding? I also want to get the
> industry PEG.
>
> It's been several years since I first built my spreadsheet based on
> SMFaddin and I haven't kept up with all the developments.
>

Tue Jun 27, 2017 2:25 pm (PDT) . Posted by:

bob_15861586

Do the SMF macro's write any cookies to the user's machine?


Thanks,


Bob

Tue Jun 27, 2017 3:56 pm (PDT) . Posted by:

"Randy Harmelink" rharmelink

Not that I know of. The Windows DLL's it uses do read cookies. Not sure if
they would write or not? For example, add-in/EXCEL may need an IE security
cookie in place to access the secure data of a web site. The add-in reads
source code of web pages from the web sites, so it doesn't even do script
processing (which means dynamically built web pages are a problem).

On Tue, Jun 27, 2017 at 2:25 PM, bob_15861586@
​...
wrote:

> Do the SMF macro's write any cookies to the user's machine?
>
>
>
>
For the Add-in, Documentation, Templates, Tips and FAQs, visit http://ogres-crypt.com/SMF

Tidak ada komentar:

Posting Komentar